Maslosoft Mangan API
Class BooleanValidatorAnnotation
BooleanValidator validates that the attribute value is either Maslosoft\Mangan\Annotations\Validators\BooleanValidatorAnnotation::$trueValue
or Maslosoft\Mangan\Annotations\Validators\BooleanValidatorAnnotation::$falseValue
.
When using the Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation::$message
property to define a custom error message, the message
may contain additional placeholders that will be replaced with the actual content. In addition
to the "{attribute}" placeholder, recognized by all validators (see Validator),
BooleanValidator allows for the following placeholders to be specified:
- {true}: replaced with value representing the true status
Maslosoft\Mangan\Annotations\Validators\BooleanValidatorAnnotation::$trueValue
. - {false}: replaced with value representing the false status
Maslosoft\Mangan\Annotations\Validators\BooleanValidatorAnnotation::$falseValue
.
- Maslosoft\Addendum\Collections\MetaAnnotation
- Maslosoft\Mangan\Meta\ManganAnnotation
- Maslosoft\Mangan\Meta\ManganPropertyAnnotation
- Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation
- Maslosoft\Mangan\Annotations\Validators\BooleanValidatorAnnotation uses Maslosoft\Mangan\Validators\Traits\Strict, Maslosoft\Mangan\Validators\Traits\AllowEmpty
Package: system\validators
Author: Qiang Xue qiang.xue@gmail.com
Version: $Id$
Located at Annotations/Validators/BooleanValidatorAnnotation.php
Methods inherited from Maslosoft\Mangan\Meta\ManganPropertyAnnotation
Methods inherited from Maslosoft\Mangan\Meta\ManganAnnotation
Constants summary
Constants inherited from Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation
Properties summary
public
mixed
|
$trueValue
the value representing true status. Defaults to '1'. |
#
'1'
|
public
mixed
|
$falseValue
the value representing false status. Defaults to '0'. |
#
'0'
|
Properties inherited from Maslosoft\Mangan\Annotations\Validators\ValidatorAnnotation
$class
,
$except
,
$message
,
$on
,
$proxy
,
$safe
,
$skipOnError
,
$value