Tuesday, February 23, 2010

Re: How do I add custom validation in controller?

please don't!! don't check that within the controller and don't even think about check it with javascript!! :'( use Model's custom validation, these don't need fields to be a field of your database, within a custom validation function you can just check if you have a 'terms' field and is true, 1. Let Cake help you!!
--
anl


On Tue, Feb 23, 2010 at 1:20 PM, Jeremy Burns <jeremyburns@me.com> wrote:
Check for their presence/value in the controller, and then unset them from the array before saving.

Jeremy Burns
jeremyburns@me.com


On 23 Feb 2010, at 12:16, Zac Tolley wrote:

> Ah but, the thing is I'm verifying fields that are not part of the
> model, I'm simply verifying that they agree to some terms and that the
> 2 passwords they entered match
>
> 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

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

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

No comments: