2008年9月26日星期五

Re: [fw-mvc] Form elements as arrays and validators

-- Cristian Bichis <contact@zftutorials.com> wrote
(on Friday, 26 September 2008, 08:46 AM +0300):
> I am trying to understand a bit how a validator works against a Zend_Form.
>
> In case of a simple field (like a text one) to validator is passed the value of
> that field (a string).
>
> How works validation for multi value cases ? As: text[], text[], ...

The entire array is passed.

> As far as i saw each value of array is passed separated to isValid of
> validator...
>
> This is a nomal behavior ? This can be changed ?

Yes, it's normal behavior. No, it cannot be changed unless you override
the element's isValid() method.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: