0

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.

1 Answer 1

3

You just need wrap it in one more array:

'validators' => array(array('EmailAddress')),
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much! I'm finding that zend's documentation is pretty poor.
would you happen to know the syntax of a decorator that holds a description for a field??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.