just submit only that field

the model validation is only triggered for fields that are beeing
passed
so if there is only one passed form field, only this one will be
validated

PS: dont use "required''=>true" in your rules or you screw it up


On 7 Nov., 17:43, "Dave" <make.cake.b...@gmail.com> wrote:
> How can I validate a single field using Ajax?
>
> I am attempting to use jquery remote feature to check fields for validity.
> But its checking the entire model and reporting fields that have not had
> data entered. If a form has 3 fields and the user types into the second
> field for example i only want to check if that field is valid, not the
> entire form.
>
> I am trying to validate an email to start off with so data[Profile][email] =
> mytestem...@something.com gets sent to cake to validate
>
> How can I validate only Profile.email? I want to use the same function
> eventually to validate other fields so i do not want to hard code 'email'
> into the function. Is there a way to get the field name [email] as a
> variable and then validate just that rule in the model and return a true or
> false?
>
> 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-php@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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to