문제

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')),
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top