If validation passes, it will do use next rules, the last key is only to
stop there when it fails. By default cake will execute all rules even if
one already failed.


2013/7/3 kyleobrien91 <notifications@github.com>

> In en/The-Manual/Common-Tasks-With-CakePHP/Data-Validation.rst:
>
> > @@ -243,6 +243,18 @@ during the creation of a new record. Likewise, if it is defined as ‘on’
> >  The default value for ‘on’ is null. When ‘on’ is null, the rule will be
> >  enforced during both creation and update.
> >
> > +last
> > +----
> > +
> > +The 'last' key can be set to a boolean value equivalent to either true
> > +or false.
> > +
> > +If set to true, the field in which it is set will be the last field to
> > +be validated. Any other operation after validation will continue as
> > +normal unless the current rule contained a validation error.
>
> So, if we have three fields and the second one (containing the 'last' key)
> invalidates, does Cake attempt to validate the third or is the validation
> for that field automatically true or simply not checked at all?
>
> I think my explanation is ambiguous. What about the following:
>
> If 'last' => true, the field in which it is set will be the last to be
> validated. If validation passes, any validation rules after the current one
> will not be checked. If validation fails, an error is returned as usual.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cakephp/docs/pull/618/files#r5007698>
> .
>