Skip to content

Instantly share code, notes, and snippets.

@Bittarman
Created March 27, 2010 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bittarman/346341 to your computer and use it in GitHub Desktop.
Save Bittarman/346341 to your computer and use it in GitHub Desktop.
<?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