Class StringValidator
String validator
- Phramework\Validate\BaseValidator
- Phramework\Validate\StringValidator
Direct known subclasses
Phramework\Validate\DatetimeValidator
,
Phramework\Validate\DateValidator
,
Phramework\Validate\EmailValidator
,
Phramework\Validate\URLValidator
,
Phramework\Validate\UsernameValidator
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.0.0
See: ECMA 262 regular expression dialect for regular expression pattern
Located at StringValidator.php
Methods summary
public
|
#
__construct( integer $minLength = 0, integer|null $maxLength = null, string|null $pattern = null, boolean $raw = false )
[__construct description] |
public
|
Methods inherited from Phramework\Validate\BaseValidator
__get()
,
__set()
,
createFromArray()
,
createFromJSON()
,
createFromObject()
,
createFromObjectForAdditional()
,
getType()
,
getTypeAttributes()
,
parse()
,
parseStatic()
,
registerValidator()
,
setDefault()
,
setDescription()
,
setEnum()
,
setTitle()
,
toArray()
,
toJSON()
,
toObject()
,
validateCommon()
,
validateEnum()
Properties summary
protected static
string
|
$type
Overwrite base class type |
#
'string'
|
protected static
string[]
|
$typeAttributes
Validator's attributes Can be overwritten |
#
[
'minLength',
'maxLength',
'pattern',
'raw' //non standard
]
|
Properties inherited from Phramework\Validate\BaseValidator
Magic properties
public
integer
|
$minLength
Minimum number of its characters |
public
integer|null
|
$maxLength
Maximum number of its characters |
public
string|null
|
$pattern
Regular expresion pattern for validating |
public
boolean
|
$raw
Keep raw value, dont sanitize value after validation |