> Actually, it needs to be documented better. The idea is that it
> validates against *only* those items that are passed to it -- and not
> *all* elements in the form (which is the behavior of isValid()). If an
> element passed to isValidPartial() has specified that it is required,
> then isValidPartial() will merrily check to see if a non-empty value was
> provided.
>
I'm not sure I see the point of it, then, certainly in a POST environment
(which will return all values of the form, some as empty strings). If I
know which values I am expecting to be present, then I could trivially loop
through them and do something like
$form->getElement('expectedName')->isValid($value); if I don't know which
values I'm getting, isValidPartial is no help because if I pass the form the
whole POST array, it validates everything.
When should I use isValidPartial? I'm sure I saw it in the ZFiA book in an
Ajax context, but is it useful elsewhere?
--
View this message in context:
http://www.nabble.com/isValidPartial-behaviour-problem--tp21954845p21958253.html
Sent from the Zend Framework mailing list archive at Nabble.com.