Good Day,

I tried to create a form with this code:

$oEmail = new Zend_Dojo_Form_Element_ValidationTextBox('email');
$oEmail->addValidator('EmailAddress')
        ->setRequired(true)
        ->setLabel('Your e-mailaddress:')
        ->setAttribs(array('rows' => '10', 'cols' => '40'))
        ->setInvalidMessage("Oh noo, it's invalid!")
        ->setRegExp("A long regexp");

Now when i execute this code, I get this as result:

Catchable fatal error: Argument 4 passed to
Zend_Dojo_View_Helper_ValidationTextBox::validationTextBox() must be an
array, null given in
/Users/***/***/***/library/Zend/Dojo/View/Helper/ValidationTextBox.php on
line 64


As you can see: I tried adding the setAttribs method to solve this, because
afaik the fourth Argument in the error is about attribs.

I also tried to add four elements to the first code line, but that didn't
work either.


Any ideas?

Also, I would like to know if it is possible to use both Zend_Form's
validation, and Zend_Dojo validation, to ensure validation when someone have
javascript disabled or so.


Fsmmls

Reply via email to