On May 28, 8:07 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> With 1.2's validation stuff, unobtrusive JavaScript validation is easy
> if the validation rules are dumped in JSON format in class attribute.
>
> For some previous revisions, I have added a dirty patch <https://
> trac.cakephp.org/ticket/2359>. But, except gwoo, no one seem to be
> interested. May I know the reason? I also, think, it's time to clean
> prototype dependencies and to move to jQuery or any behavior like
> unobtrusive libs.
>
> --
>   <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com    Blog:http://rajeshanbiah.blogspot.com/

I'm a +1 for obtaining unobtrusive JS validation that falls back onto
the defined validation constraints in the models.

It appears your patch covers a bit more than just serving up the
relevant JSON.
Maybe reducing it and cleaning it up would be beneficial.

Also, consider the user-callbacks that can be used for more advanced
validation -- they can't exactly be described directly in JSON...
Because of this, It's potential that at least part of the validation
will have to be done with XHR.

If part of it has to be passed back to php, why not all of it?
Sure, a speed hit for the simple stuff but I think if you treated all
the fields in the same manner you could gain some simplicity.

Anyhow, it seems like most of this could be accomplished with a
component and a small method in a controller -- without core
modification.

--
Travis


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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