Hello fellow cakePHP noob :-)
 
You might also want to read one of the advanced validation tutorials in the wiki...
They allow you to do more advanced checking also in the model.
Ive used this one
http://wiki.cakephp.org/tutorials:advanced_validation
Its pretty good since it lets you specify a function to run instead of just a regex pattern, which is very useful if you want to compare two emails check if a username is unique and the like. (make sure though that the username has been checked for for valid characters first dont want to potentially open ourselves up for exploits already in our validation scripts.
 
 
On 5/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I think I may have answered my own question... Looking *outside* of the
data validation chapter in the manual and skimming through the "model"
chapter, I found the beforeValidate() method. With a description:

"Use this callback to modify model data before it is validated. It can
also be used to add additional, more complex validation rules, using
Model::invalidate()."

So I assume beforeValidate() can be used to run custom validation from
within the model and trigger the invalidate() method if something
fails. I suppose this topic just turned into a note for other "n00bs"
with similiar issues...



--
Rasmus Lauridsen
Aarhus C, Denmark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to