HTML_QuickForm::registerRule()

HTML_QuickForm::registerRule() -- Registers a new validation rule

Synopsis

require_once 'HTML/QuickForm.php';

void HTML_QuickForm::registerRule (string $ruleName, string $type, string $data1 [, string $data2 = NULL])

Описание

Registers a new validation rule

Параметр

string $ruleName

Name of validation rule

string $type

Either: 'regex' or 'callback' ('function' is also kept for backward compatibility). If registering a subclass of HTML_QuickForm_Rule you can pass anything here, preferrably NULL or empty string.

string $data1

Name of function, regular expression, classname of HTML_QuickForm_Rule subclass or an instance of such class.

string $data2

Object parent of above function, name of the file containing the subclass of HTML_QuickForm_Rule.

Throws

throws no exceptions thrown

Заметка

since 1.0

Эта функция не должна вызываться статически.


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ