CheckFields
array
CIBlockProperty*::CheckFields(
array arProperty,
array value
);
The method checks validity of property value and returns an array. Returns empty when no errors are found and contains error messages, when errors are found. Static method.
Note: the method is called when adding and modifying an element.
Call parameters
Parameter | Description |
---|---|
arProperty
| Property metadata. See Iblock element properties |
value | Property value. Array type as follows:
array( "VALUE" => value, "DESCRIPTION" => description, ); |
Returned value
Error message array or empty array.
See Also
Examples
<?
class CIBlockPropertyMyDateTime
{
function CheckFields($arProperty, $value)
{
$arResult = array();
if(strlen($value["VALUE"])>0 && !CheckDateTime($value["VALUE"]))
$arResult[] = GetMessage("IBLOCK_PROP_DATETIME_ERROR");
return $arResult;
}
}
?>
© «Bitrix24», 2001-2024