View Single Post
  #4 (permalink)  
Old 04-15-2008, 04:14 PM
chinaski chinaski is offline
Junior Member
 
Join Date: Apr 2008
Posts: 4
Default $validators

The $validators was a cut-and-paste error and was not in my final form code (sorry about that).

Here is the form code that works:

$testing = new Zend_Form_Element_Text('testing');
$testing->setLabel('Test Value')
->setRequired(true);

$testing->addPrefixPath('My','My/');

$testing->addValidator('TestVal');

Adding the prefixPath to the element runs the custom validator perfectly, but adding it to the form as in the previous message it doesn't work.
Reply With Quote