Maslosoft Mangan API
Class RequiredValidator
RequiredValidator
- Maslosoft\Mangan\Validators\BuiltIn\RequiredValidator implements Maslosoft\Mangan\Interfaces\Validators\ValidatorInterface uses Maslosoft\Mangan\Validators\Traits\Strict, Maslosoft\Mangan\Validators\Traits\Messages, Maslosoft\Mangan\Validators\Traits\SkipOnError, Maslosoft\Mangan\Validators\Traits\OnScenario, Maslosoft\Mangan\Validators\Traits\Safe, Maslosoft\Mangan\Validators\Traits\When
Author: Piotr Maselkowski
Located at Validators/BuiltIn/RequiredValidator.php
Methods summary
public
|
Methods inherited from Maslosoft\Mangan\Interfaces\Validators\ValidatorInterface
Methods used from Maslosoft\Mangan\Validators\Traits\Messages
Methods used from Maslosoft\Mangan\Validators\Traits\When
Constants summary
Constants inherited from Maslosoft\Mangan\Interfaces\Validators\ValidatorInterface
Properties summary
public
mixed
|
$requiredValue
the desired value that the attribute must have. If this is null, the validator will validate that the specified attribute does not have null or empty value. If this is set as a value that is not null, the validator will validate that the attribute has a value that is the same as this property value. Defaults to null. |
#
null
|
public
boolean
|
$trim
whether the value should be trimmed with php trim() function when comparing strings. When set to false, the attribute value is not considered empty when it contains spaces. Defaults to true, meaning the value will be trimmed. |
#
true
|
public
string
|
$msgExact
|
#
''
|
public
string
|
$msgBlank
|
#
''
|