Class Regex
Check if the input is valid by specified regular expression
-
Wei\Base
-
Wei\Validator\BaseValidator
-
Wei\Validator\Regex
Direct known subclasses
Wei\Validator\Alnum,
Wei\Validator\Alpha,
Wei\Validator\PlateNumberCn,
Wei\Validator\PostcodeCn,
Wei\Validator\QQ,
Wei\Validator\Uuid,
Wei\Validator\Chinese,
Wei\Validator\Color,
Wei\Validator\Digit,
Wei\Validator\DoubleByte,
Wei\Validator\IdCardMo,
Wei\Validator\MobileCn,
Wei\Validator\Phone,
Wei\Validator\PhoneCn
Methods summary
public
boolean
|
#
__invoke( mixed $input, null|string $pattern = null )
Returns whether the $input value is valid
Returns whether the $input value is valid
Parameters
Returns
boolean
Overrides
|
protected
boolean
|
#
doValidate( mixed $input )
Validate the input value (ignore the $negative property)
Validate the input value (ignore the $negative property)
Parameters
- $input
- The input to be validated
Returns
boolean
|
Methods inherited from Wei\Validator\BaseValidator
addError(),
getErrors(),
getFirstMessage(),
getJoinedMessage(),
getMessages(),
getName(),
hasError(),
isString(),
isValid(),
loadTranslationMessages(),
setMessages(),
setName(),
storeOption()
|
Properties summary
protected
string
|
$patternMessage
|
#
'%name% must match against pattern "%pattern%"'
|
protected
string
|
$negativeMessage
The common message for negative validator
The common message for negative validator
|
#
'%name% must not match against pattern "%pattern%"'
|
protected
string
|
$pattern
|
|