You can set password validation only for add:
http://book.cakephp.org/view/127/One-Rule-Per-Field
using 'on' => 'create', // or: 'update'

Or hack like unset($this->Model->validate['password'] :)

On Aug 20, 6:58 pm, DavidH <[email protected]> wrote:
> Hi
>
> Is there a simple way to do this? I have a UsersController and User
> method that does a dose of validation on the username and passwords
> fields (as per this excellent tutorialhttp://tinyurl.com/52robw).
>
> It works fine on the add; but when invoking the edit I don't want the
> users passwords to be updated (this will; be done through a separate
> view) and so I don't want any validation to fire for the password
> field.
>
> I saw that you can turn validation off in the save() method; but that
> seems to be for all fields. Is there a way to turn of validation on
> specific fields? Or do I have to write a customer validation method
> that recognises which action has been invoked?
>
> Cheers
>
> David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to