Created
March 27, 2010 20:43
-
-
Save Bittarman/346341 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Module_Form_NewSomething extends Zend_Form | |
{ | |
public function init() | |
{ | |
$this->addElements(array( | |
$name = new Zend_Form_Element_Text('name'), | |
$email = new Zend_Form_Element_Text('email'), | |
)); | |
$name->setLabel('Name') | |
->addValidator('Alnum', false, array('messages' => array( | |
// set message here | |
)) | |
->setRequired(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment