Documentation

validate

boolean|string public
\Bitrix\Main\Entity\Validator\Length::validate(
 mixed $value,
 array $primary,
 array $row,
 \Bitrix\Main\Entity\Field $field
);

This non-static method checks minimum and/or maximum value length (as a string). Returns true when the check is successful or, otherwise returns string with error text.

Parameters

ParameterDescriptionVersion
$valueValue to be checked.
$primaryDo not use in this function.
$rowDo not use in this function.
$fieldMeta data field.

Example



© «Bitrix24», 2001-2024
Up