Use parsley.js for certain areas of a form?

自作多情 提交于 2019-12-02 00:37:59

You can initiate Parsley via JavaScript so that you can pass in custom options. Then you can just use the excluded param to remove whichever sections of the form you don't wish to validate.

http://jsfiddle.net/5JA8R/

$('form').parsley({
    excluded: '.two input, .three input'
});

Good news, Parsley2 now have a group option that allows to define different areas on a form and validate them separately :)

Tadaa: http://parsleyjs.org/doc/examples/multisteps.html

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