Using Parsley.js with Meteor using HTML Code

允我心安 提交于 2019-12-06 02:05:54

Per the docs at http://parsleyjs.org/documentation.html#javascript:

Parsleys DOM-API is great. But not so great for complex forms, or dynamically generated forms.

Meteor's templates are dynamically generated forms. Therefore you need to initialize Parsley via JavaScript, in a rendered function.

There might be a way to initialize Parsley on rendered as if it were an initial page load, and therefore get it to recognize and parse the parsley- attributes, but such a method is undocumented and might be unreliable in the future.

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