Google helped me figure it out. Would someone mind commenting on what I
should have been looking for in the ZF source code in order to figure this
out myself?
$this->addElement('text', 'l_title', array(
'decorators' => $this->_defaultDecorators,
'required' => true,
'label' => 'Link Title: ',
'filters' => array('StringTrim'),
'validators' => array(array('Alnum', false, true))
));
Thanks.
On Tue, Apr 21, 2009 at 5:46 PM, J DeBord <[email protected]> wrote:
> How would I set the optional value for the validator Alnum to true using
> the addElement syntax below?
>
> $this->addElement('text', 'l_description', array(
> 'decorators' => $this->_defaultDecorators,
> 'label' => 'Link Description',
> 'required' => false,
> 'filters' => array('StringTrim'),
> 'validators' => array('Alnum')
> ));
>
> Thanks.
>