Thanks guys that saves the Bacon. I thought CakePHP would chuck a wobbly if you have extra fields in the validation which don't exist in the database. But that doesn't seem to be the case.
Also your password behaviour looks good, I will look into it. On Oct 20, 12:55 pm, euromark <[email protected]> wrote: > unsetting them is not even necessary if those input names do not exist > in the table > simply validate against them as other inputs via $validate array in > the model - nothing else has to be done. > and you SHOULD do this in the model - not the controller. > > as for password confirmations you can use > behaviorshttp://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/ > > they can attach those rules to the model as well > > On 20 Okt., 17:33, Jeremy Burns | Class Outfit > > <[email protected]> wrote: > > Create them as normal form inputs, check/validate them in the model and > > then unset them from $this->data in the model when you're done. > > > Jeremy Burns > > Class Outfit > > >http://www.classoutfit.com > > > On 20 Oct 2011, at 15:26, Shukuboy wrote: > > > > Hi, > > > > I've been looking around for a couple of days to see whether it's > > > possible to have a couple of fields defined in the Model for the > > > purpose of validation, but let Cake know not to persist them. > > > > A good example would be a 'Confirm' field for user registration. I'd > > > like to be able to validate 'Confirm' against 'Password' by specifying > > > custom validation in the Model. I know this can be done in the > > > controller easily but is there a way to do this in the Model ? > > > > Cheers, > > > Shukuboy > > > > -- > > > Our newest site for the community: CakePHP Video > > > Tutorialshttp://tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > > others with their CakePHP related questions. > > > > To unsubscribe from this group, send email to > > > [email protected] For more options, visit this group > > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
