Hi there! I'm trying to make a textarea, dojo-enabled, with a maximum
of 500 characters. Here's what I have:
// creating validator
$validator = new Zend_Validate_StringLength();
$validator->setMin(2)
->setMax(5)
->setMessage('Text is too
long!',Zend_Validate_StringLength::TOO_LONG);
// create textarea and add validator
$el = new Zend_Dojo_Form_Element_Textarea("ef_Description");
$el->setLabel("Describe the Event")
->addValidator($validator);
$this->addElement($el);
Everything else validates, dojo-style, but every other form element is
derives from ValidationTextBox. Some debugging shows that the isValid
function, defined in Zend/Validate/StringLength.php, is never being
called.
How do I call it? Is it just a matter of adding onkeydown and onblur
events?
Thanks again for everyone's help. I promise I use the list as a last
resort, and I'm stumped!
Ian