You could omit the 'required' => true in the validation rules and keep
an 'allowEmpty' => false instead. This way upon sign up both fields
need to be filled in, but on changing, you don't need to submit both.
For the 'unique' problem, you might have to check if the email is the
same as what is already saved, and if so, don't bother saving it.

On Nov 23, 1:45 pm, Dave <make.cake.b...@gmail.com> wrote:
> I cant figure out how to do this.
> I have 2  fields, an email and a url, both are required and need to be
> unique when a user wants to update thier info.
>
> If the user is only updating 1 field the other required will fail
> because its required. If they enter in the email field their current
> email because it says required it will come back invalid because its
> no longer unique. Vice versa for the url.
>
> They may only want to change one of the 2 fields information but how
> can you get around this? I dont want them entering in anything thats
> not valid for email / url so i need the validation rules. They are
> both required but how can they edit just 1 field?
>
> Thanks,
>
> Dave

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to