Thanks guys, I need more time to improve my php/cakephp skills. Like I
said earlier it's not my talent. I have to do this because of a
project. Thanks for teaching !

On Dec 19, 7:12 am, euromark <dereurom...@googlemail.com> wrote:
> and if you do use beforeValidate
> dont return false!
>
> you need to return true in order to validate the other fields as well
> cake will automatically stop after the validation as soon as one field
> invalidates
> so there is no reason to abort before that.
>
> On 18 Dez., 20:00, cricket <zijn.digi...@gmail.com> wrote:
>
> > On Sat, Dec 18, 2010 at 2:47 AM, John Maxim <goog...@gmail.com> wrote:
> > > Thanks Solved. But I have a question, with that said, 1.3 version and
> > > the newer--it all seem much easier than the older version, seems like
> > > less codes required...
>
> > > Or is it I'm missing something ?
>
> > > All I have to do is just add in the additional array into my existing
> > > username validation array instead of creating a new function called
> > > beforeValidate(). Am I right ?
>
> > > Just to ensure because I'm quite new to this and I'm programming
> > > challenged. This will help to clarify my upcoming tasks.
>
> > It's just a conceptual misunderstanding. The beforeValidate callback
> > is meant for situations where you might need to either massage the
> > data a bit--or even adjust the model's validation rules--before
> > allowing Cake to validate it according to the model's $validate rules.
> > What your examples were doing, though, is doing the actual validation
> > itself. Instead of using beforeValidate, you should be assigning a
> > custom model method for the entry in $validate for username. However,
> > Cake has some built-in methods for certain common situations. In this
> > case, you can use isUnique.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to