Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
booleanvalidator.php
1
<?php
9
namespace
Bitrix\Main\ORM\Fields\Validators
;
10
11
use
Bitrix\Main\ORM\Fields\BooleanField
;
12
use
Bitrix\Main\ORM\Fields\Field
;
13
18
class
BooleanValidator
extends
Validator
19
{
20
public
function
validate
($value, $primary, array $row,
Field
$field)
21
{
23
if
(in_array($field->normalizeValue($value), $field->getValues(),
true
))
24
{
25
return
true
;
26
}
27
28
return
$this->
getErrorMessage
($value, $field);
29
}
30
}
Bitrix\Main\ORM\Fields\BooleanField
Definition
booleanfield.php:20
Bitrix\Main\ORM\Fields\Field
Definition
field.php:25
Bitrix\Main\ORM\Fields\Validators\BooleanValidator
Definition
booleanvalidator.php:19
Bitrix\Main\ORM\Fields\Validators\Validator
Definition
validator.php:18
Bitrix\Main\ORM\Fields\Validators\Validator\getErrorMessage
getErrorMessage($value, ORM\Fields\Field $field, $errorPhrase=null, $additionalTemplates=null)
Definition
validator.php:50
Bitrix\Main\ORM\Fields\Validators\IValidator\validate
validate($value, $primary, array $row, Field $field)
Bitrix\Main\ORM\Fields\Validators
Definition
booleanvalidator.php:9
modules
main
lib
orm
fields
validators
booleanvalidator.php
Создано системой
1.10.0