Grails client side validation

巧了我就是萌 提交于 2019-12-06 01:31:10

问题


How do you (if you) manage client side validation with grails ? Do you use a plugin or do you mirror your constraints using a javascript framework ? Cheers


回答1:


I haven't used them personally but these two plugins might help you out:

http://grails.org/plugin/javascript-validator

http://www.grails.org/plugin/remote-constraints




回答2:


On Grails projects that I've been a part of, We haven't used a plugin but rather a mashup of javascript plugins and custom validators (jQuery plugins, Prototype, Dojo, etc.) to achieve the client side validation. Its handy to provide instant field-level validation on the client.

As leebutts said, The source of these plugins are open. Why not consider enhancing one(or both) of these plugins to achieve what you need and contribute that back to the community?

Might be worth checking out the new constraints plugin. With it Constraints become a Grails artefact, and might make this job easier.



来源:https://stackoverflow.com/questions/1806086/grails-client-side-validation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!