Parsley.js: never write a single JavaScript line to validate your forms
1–10 of 80 posts
Re: Parsley.js: never write a single JavaScript line to validate your forms
#2Re: Parsley.js: never write a single JavaScript line to validate your forms
#3Re: Parsley.js: never write a single JavaScript line to validate your forms
#4If you like the concept of "extending html" as used here then you should probably checkout AngularJS: http://angularjs.org
Re: Parsley.js: never write a single JavaScript line to validate your forms
#5Having just hit this situation (validating a form client-side), I found the best solution was to transport the form schema from the server (because I use Django, I can easily whip up a ModelForm), then push that into a simple Javascript Form object which renders the schema and adds validation. Maybe there's better ways, but that's what worked for me. Curious what others have done .. :-)
Re: Parsley.js: never write a single JavaScript line to validate your forms
#6The implementation just smacks of AngularJS. In fact, implementing something like this would be just short of trivial using Angular...! If you like the concept of "extending html" as used here then you should probably checkout AngularJS: http://angularjs.org
At first glance, this looks like the best validation library I have seen. It so hard to find validation libs, that don't get into your way.
Re: Parsley.js: never write a single JavaScript line to validate your forms
#7I suppose this is more suited to when your models and schema are also defined on the client side? Having just hit this situation (validating a form client-side), I found the best solution was to transport the form schema from the server (because I use Django, I can easily whip up a ModelForm), then push that into a simple Javascript Form object which renders the schema and adds validation. Maybe there's better ways,…
Your solution sounds nice for single page apps.
Re: Parsley.js: never write a single JavaScript line to validate your forms
#8Speaking with my security hat on: This is a really nice library, but you also do the same validations server side right?
Re: Parsley.js: never write a single JavaScript line to validate your forms
#9I suppose this is more suited to when your models and schema are also defined on the client side? Having just hit this situation (validating a form client-side), I found the best solution was to transport the form schema from the server (because I use Django, I can easily whip up a ModelForm), then push that into a simple Javascript Form object which renders the schema and adds validation. Maybe there's better ways,…
Yii framework (PHP) supports validation through Ajax (serializes the form, sends for regular server-side validation and displays the errors on the form). A godsend if your form does not change, and impossible to work with if it is dynamic (consider batch entries with "Add line" features, etc.).
I haven't seen a seamless integration on this higher level.