RulePattern
extends Rule
in package
Compare Pattern
Table of Contents
Constants
Properties
Methods
- __construct() : mixed
- getInpPara() : string
- getJSmessage() : string
- getMessage() : string
- getRuleVal() : mixed|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'
RULE
public
string
RULE
= 'PATTERN'
Properties
$invert
protected
bool
$invert
= false
$message
protected
string
$message
$mode
protected
string
$mode
$value
protected
mixed
$value
Methods
__construct()
public
__construct(string $mode, string $msg) : mixed
Parameters
- $mode : string
- $msg : string
-
(can be different in child class)
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() : mixed|null
Return values
mixed|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