RuleRange
extends Rule
in package
Compare min/max number
Table of Contents
Constants
Properties
Methods
- __construct() : mixed
- getInpPara() : string
- getJSmessage() : string
- getMessage() : string
- getRuleVal() : float|int|null
- Returns rule value
- getScript() : array<string, mixed>
- isValid() : bool
- Skip validating empty value
- rebindInput() : void
- Replace Input from actual subform
- setInvert() : self
- Set rule move
- setMessage() : self
- Set error text message
- translate() : void
- Translate plugin strings
- getJsInput() : array<string, mixed>|string
- Get value or input link for javascript
- validate() : bool
Constants
FORMAT
public
string
FORMAT
= 'FORMAT'
MAX
public
string
MAX
= 'MAX'
MIN
public
string
MIN
= 'MIN'
Properties
$invert
protected
bool
$invert
= false
$message
protected
string
$message
$mode
protected
string
$mode
$value
protected
mixed
$value
$exact
private
bool
$exact
Methods
__construct()
public
__construct(string $mode, string $msg[, Input|float|int $val = null ][, bool $exact = true ]) : mixed
Parameters
- $mode : string
- $msg : string
- $val : Input|float|int = null
- $exact : bool = true
-
Include border points
getInpPara()
public
getInpPara(Input $input) : string
Parameters
- $input : Input
Return values
stringgetJSmessage()
public
getJSmessage(Input $input) : string
Parameters
- $input : Input
Tags
Return values
stringgetMessage()
public
getMessage(Input $input) : string
Parameters
- $input : Input
Return values
stringgetRuleVal()
Returns rule value
public
getRuleVal() : float|int|null
Return values
float|int|nullgetScript()
public
getScript(Input $input) : array<string, mixed>
Parameters
- $input : Input
Return values
array<string, mixed>isValid()
Skip validating empty value
public
isValid(Input $input) : bool
Parameters
- $input : Input
Return values
boolrebindInput()
Replace Input from actual subform
public
rebindInput(int $type, Form $form) : void
Parameters
- $type : int
- $form : Form
setInvert()
Set rule move
public
setInvert(bool $invert) : self
Parameters
- $invert : bool
Return values
selfsetMessage()
Set error text message
public
setMessage(string $message) : self
Parameters
- $message : string
Return values
selftranslate()
Translate plugin strings
public
translate(Translator $tr) : void
Parameters
- $tr : Translator
getJsInput()
Get value or input link for javascript
protected
getJsInput() : array<string, mixed>|string
Return values
array<string, mixed>|stringvalidate()
protected
validate(Input $input) : bool
Parameters
- $input : Input