Tuesday, February 23, 2010

How do I add custom validation in controller?

I have created a form with the html and form helpers and setup
validation rules in my model and this seems to work pretty well
(anyone got this integrated with jquery?)

I have a question though, in my form I have a couple of extra fields,
one is a checkbox to accept terms and conditions, and another is a
password validation field (they type in new password twice).

Now, I can easily put some logic into the controller to check these
things when the form is submitted, but is there any way I can do this
in such a way that it fits into the cake flow, so if one of my checks
fails it go back to the form and puts up a messing below the filed in
the same style, or am I going to do this manually?

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate