开发者

When switching to jQuery, which validation framework is used?

When you switch the js framework in RoR to jQuery, 开发者_Go百科what validation framework is used?


I assume you mean javascript validation, well.. you can use http://livevalidation.com/ which is nice, but there are many more that offer the same thing, even jQuery specific.


I don't think you get any JS goodies for validation with Prototype anyway do you? I don't know, never used it.

Anyway you should still definitely use all your normal ActiveRecord validations on the server side. If you're using ajax, you can render out your errors as your normally would, but through a script response rather than html response.

If you looking for a really wicked jQuery lib that adds a bunch of cool addons, I've been using jQuery tools and it's super lightweight and very robust. You can pick and choose what features you want and one of those is a validation framework.


There is no validation framework automatically when you switch to using jQuery instead of Prototype. There's no validation framework even if you don't :)

Any validation that gets done gets done on the server side, where it should be... (an Ajax request could be used to get it back without the page refresh).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜