You just need wrap it in one more array:
'validators' => array(array('EmailAddress')),
سؤال
I'm looking for form validation syntax for an Email address in array notation.
This is what i have currently.
$this->addElement('text', 'email', array(
'placeholder' => 'email address',
'required' => true,
'filters' => array(
array('name', 'StringTags'),
arary('name', 'StringTrim'),
),
'validators' => array('EmailAddress')
));
Any help would be greatly appreciated.
Cheers, Daniel.
المحلول
You just need wrap it in one more array:
'validators' => array(array('EmailAddress')),