R. Rajesh Jeba Anbiah wrote:
On Jun 13, 9:45 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
R.RajeshJebaAnbiahwrote:> FWIW, it's no way related to the plugin, but I
have patched CakePHP
to dump the validation rules in JSON <https://trac.cakephp.org/ticket/2359>;
I think, this will help to have only one rule.
Thanks. With that it shouldn't be difficult to dump rules that work with
the validation plugin.
The idea was impressed by validation plugin. But, I found that the
validation rules of CakePHP differs to the one of validation plugin;
with the JSON dumping, it would be easier to achieve the same result
in jQuery.
I guess that scenario can be found at every serverside validation
framework. Considering that it is impossible to provide a common
denominator for all of those, an adapter seems to be the better idea.
There should be always some kind of required-method.
I wonder if that adapter should be on the client- or on the server-side.
Eg. modify that JSON dumper to adapt CakePHPs rules to the one of the
plugin, or put that JSON dump through a bit wrangling before passing it
to the plugin.
--
Jörn Zaefferer
http://bassistance.de