1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
class Perso_Form_Identification extends Zend_form {
public function __construct($options = null) {
parent::__construct($options);
$this->setName('identification');
$this->setMethod('POST');
}
public function init() {
$this->addElement('text', 'login',
array(
'label' => 'login',
'validators' => array(new Zend_Validate_NotEmpty(Zend_Validate_NotEmpty::STRING)) // testé sans paramètre aussi ainsi qu'avec 'notEmpty' => même résultat
));
$this->addElement('text', 'mdp',
array(
'label' => 'mdp',
'validators' => array(new Zend_Validate_Regex('#^[0-9]{6}$#'))
));
$this->addElement('submit', 'submit',
array(
'label' => 'submit',
));
}
} |
Partager