Yes, you can do this. In my User model, I have a series of validation rules for a field called "new_passwd".
After this field is validated for things like minimum length I then have it hashed into the string that gets stored in the database. Here is a bakery article that can show how to do some validation on a field that does not reflect a database column: http://bakery.cakephp.org/articles/view/using-equalto-validation-to-compare-two-form-fields On Jan 21, 8:21 am, adam <[email protected]> wrote: > New question: > > Can you add validate data in your model that is absent from your > database? So if I try to solve this problem by creating a form field > called password_confirm, would I be able to validate it in my model > even though there isn't a corresponding spot in the database? > > On Jan 21, 10:08 am, adam <[email protected]> wrote: > > > I just searched the group, so nevermind this post. > > > On Jan 21, 9:49 am, adam <[email protected]> wrote: > > > > Could someone explain to me how to validate a 'password' field for > > > 'minLength'? I'm presuming that it is hashing the password before > > > validating 'minLength'. There must be some means to get around this. > > > > Thanks in advance, > > > Adam > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~----------~----~----~----~------~----~------~--~---
