Zend framework2 Date Validotor给出异常,与其他过滤器不一样

Zend framework2 Date Validotor给出异常,与其他过滤器不一样,zend-framework2,Zend Framework2,我正在Zend框架中使用4阶段注册页面 I am using Filter Class. All validations works fine and display error in their approriate place(near the element), If there is any Issue. 但我对“日期”元素有问题。它不会像其他validotors那样给出错误,并且在日期格式无效的情况下会中断页面 我用的是Like $this->add(array(

我正在Zend框架中使用4阶段注册页面

I am using Filter Class. All validations works fine and display error in their approriate place(near the element), If there is any Issue.
但我对“日期”元素有问题。它不会像其他validotors那样给出错误,并且在日期格式无效的情况下会中断页面

我用的是Like

 $this->add(array(
            'name' => 'user_profile_dob',
             'type' => 'Zend\Form\Element\Date',
             'options' => array(
                'label' => 'Birth Date',


            ),
            'attributes' => array(
                'id' => 'user_profile_dob',
                'readonly' => true,
                'placeholder' => date("m/d/y"),//set selecarray()ted to '1'
                'min'  => '1800-01-01',
                'max'  => '2010-01-01',
            )            

        ));
我错过了什么

如何使用Date元素,使其像其他元素一样显示错误。现在,它显示带有分页符的错误

An error occurred
An error occurred during execution; please try again later.
Additional information:
Zend\Filter\Exception\InvalidArgumentException

File:

    C:\wamp\www\1625\vendor\ZF2\library\Zend\Filter\DateTimeFormatter.php:60

Message:

    Invalid date string provided

默认情况下,
Zend\Form\Element\Date
元素附加了
DateTimeFormatter
过滤器。如果日期格式不正确,
DateTimeFormatter
筛选器将引发异常。如果从表单的输入筛选器中删除
DateTimeFormatter
,或者改用
Zend\form\Element\Text
元素,则可以避免此异常