i have a zend form with an element $recipe_name
as follows..
i want to check if a _recipename
already exists using validation(Zend_Validate_DbNoRecordExists).
$recipe_name= $this->createElement('text',$i.'_recipename',array('label'=> "Extra Item Name in ".$data['language'].'', 'class'=> 'inp-form',) );
$recipe_name->setDecorators(array( 'ViewHelper',
array(array('data'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td','style')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr','openOnly'=>true))));
$recipe_name->setRequired(true);
$recipe_name->addValidator('NotEmpty',true);
$recipe_name->getValidator('NotEmpty')->setMessage("Please enter Recipe section name in ".$data['language']);
How I can do that?