См. определение в файле lengthvalidator.php строка 18
◆ __construct()
__construct |
( |
| $min = 1, |
|
|
| $max = null, |
|
|
| $errorPhrase = array('MIN' => null, 'MAX' => null) ) |
- Аргументы
-
int | null | $min | |
int | null | $max | |
array | $errorPhrase | |
- Исключения
-
См. определение в файле lengthvalidator.php строка 41
◆ getMax()
Returns maximum allowed length. null if not set.
- Возвращает
- integer|null
См. определение в файле lengthvalidator.php строка 132
◆ getMin()
Returns minimum allowed length. null if not set.
- Возвращает
- integer|null
См. определение в файле lengthvalidator.php строка 121
◆ validate()
validate |
( |
| $value, |
|
|
| $primary, |
|
|
array | $row, |
|
|
Field | $field ) |
Checks minimum and/or maximum length (as string) of the value. Returns true if check was successful or string with error text otherwise.
- Аргументы
-
mixed | $value | Value to check. |
array | $primary | Has no use in this function. |
array | $row | Has no use in this function. |
Field | $field | Field metadata. |
- Возвращает
- boolean|string
Замещает IValidator.
См. определение в файле lengthvalidator.php строка 87
◆ $errorPhraseMax
◆ $errorPhraseMaxCode
$errorPhraseMaxCode = 'MAIN_ENTITY_VALIDATOR_LENGTH_MAX' |
|
protected |
◆ $errorPhraseMin
◆ $errorPhraseMinCode
$errorPhraseMinCode = 'MAIN_ENTITY_VALIDATOR_LENGTH_MIN' |
|
protected |
◆ $max
◆ $min