Maslosoft Mangan API
Class SizeValidator
Base class for size validators.
This can be used as a base for validators checking sizes:
- String Length
- Number of elements
- File size
Override msg* attributes with custom Label
annotations to
provide proper error messages.
- Maslosoft\Mangan\Validators\BuiltIn\Base\SizeValidator uses Maslosoft\Mangan\Validators\Traits\AllowEmpty, Maslosoft\Mangan\Validators\Traits\Messages
Direct known subclasses
Maslosoft\Mangan\Validators\BuiltIn\CountValidator
,
Maslosoft\Mangan\Validators\BuiltIn\StringValidator
Namespace: Maslosoft\Mangan\Validators\BuiltIn\Base
See:
Maslosoft\Mangan\Validators\BuiltIn\StringValidator
See:
Maslosoft\Mangan\Validators\BuiltIn\CountValidator
See:
Maslosoft\Mangan\Interfaces\Validators\ValidatorInterface
Author: Piotr Maselkowski
Located at Validators/BuiltIn/Base/SizeValidator.php
Methods summary
Methods used from Maslosoft\Mangan\Validators\Traits\Messages
Properties summary
public
integer
|
$max
maximum length. Defaults to null, meaning no maximum limit. |
|
public
integer
|
$min
minimum length. Defaults to null, meaning no minimum limit. |
|
public
integer
|
$is
exact length. Defaults to null, meaning no exact length limit. |
|
public
string
|
$tooShort
user-defined error message used when the value is too short. |
|
public
string
|
$tooLong
user-defined error message used when the value is too long. |
|
public
string
|
$msgInvalid
|
#
''
|
public
string
|
$msgTooShort
|
#
''
|
public
string
|
$msgTooLong
|
#
''
|
public
string
|
$msgLength
|
#
''
|