最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jQuery Mobile Form Validation - Which Plugin to choose? - Stack Overflow

programmeradmin1浏览0评论

Which framework would you choose to validate forms in a jQuery Mobile app? In addition my webapp runs in the PhoneGap native wrapper on iPhone and Android.

There are numerous jQuery form validation frameworks out there - but from your experience what works well with the mobile version of jQuery?

Criteria that would be interesting in the mobile context:

  • touch-enabled notification messages - in case of wrong validation the message is ideally optimized for small screen estate
  • message in place with the wrong form field
  • offline functionality - since the PhoneGap app runs occasionally without network access

Which framework would you choose to validate forms in a jQuery Mobile app? In addition my webapp runs in the PhoneGap native wrapper on iPhone and Android.

There are numerous jQuery form validation frameworks out there - but from your experience what works well with the mobile version of jQuery?

Criteria that would be interesting in the mobile context:

  • touch-enabled notification messages - in case of wrong validation the message is ideally optimized for small screen estate
  • message in place with the wrong form field
  • offline functionality - since the PhoneGap app runs occasionally without network access
Share Improve this question asked Jun 14, 2011 at 22:17 Michael SchmidtMichael Schmidt 3,5115 gold badges35 silver badges39 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 1

try this one: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ it worked pretty neatly for me,

I'll second the vote for the validation plugin. It shouldn't have any conflict with jqMobile since it simply works on the submit() action. Basically it intercepts the submit and applies a series of rules to check the form. You can have custom rules, custom error locations, etc. About the only thing I've had trouble with is using it with a class of fields. It pretty much wants individual names/IDs to validate.

I'm currently trying to use that plugin with JQM 1.2 and it breaks form submission handling. when i enable the plugin and submit a form successfully, the browser takes me to the action.php file that was specified in the form. when i disable the plugin, the form submits and the returned html is displayed properly via ajax and the .php file is properly never shown. so i don't think this plugin is great for JQM...

发布评论

评论列表(0)

  1. 暂无评论