/** * */ protected function definition_general() { parent::definition_general(); $mform =& $this->_form; // Restrict name to alphanumeric. $mform->addRule('name', null, 'alphanumeric', null, 'client'); }