Bitrix Site Manager

CFormValidator::Set

bool
CFormValidator::Set(
 int WEB_FORM_ID,
 int FIELD_ID,
 string VALIDATOR_SID,
 array arParams = array(),
)

The method Set attaches a validator with the specified settings to a form field. Returns true on success, or false otherwise (if there is no validator with the ID specified, error in validator etc.).

Parameters

Parameter Description
WEB_FORM_ID The web form ID.
FIELD_ID The question ID.
VALIDATOR_SID The validator identifier.
arParams An array containing the validator parameters.