HTML_QuickForm::addFormRule()
Описание
This should be used when you want to add a rule involving several fields or if you want to use some completely custom validation for your form. The rule function/method should return TRUE in case of successful validation and array('element name' => 'error') when there were errors.
Throws
Таблица 43-1. Возможные значения PEAR_Error
Error code | Error message | Reason | Solution |
---|---|---|---|
QUICKFORM_INVALID_RULE | Callback function does not exist in HTML_QuickForm::addFormRule() | Tried to pass a name of a non-existant function as a callback | Check spelling |
Пример
Пример 43-1. Using addFormRule()
|
Пред. | Начало | След. |
HTML_QuickForm::addGroupRule() | Уровень выше | HTML_QuickForm::isElementRequired() |