Parsley for validation ?

931 views
Skip to first unread message

clayton collie

unread,
Jan 28, 2013, 3:43:53 PM1/28/13
to ang...@googlegroups.com

Anyone looked at integrating ParsleyJs ? Or does Angular cover most of this territory ?

James Crosswell

unread,
May 21, 2014, 6:00:22 AM5/21/14
to ang...@googlegroups.com
I'd be interested in this too. I found this article on form validation with Angular. The result is great but so much more code to put it together than with Parsely (especially for simple stuff like "required" field validation).

Is there a "recommended" approach to form validation with Angular?

Cheers,
James

Richard Seldon

unread,
May 21, 2014, 6:13:38 AM5/21/14
to ang...@googlegroups.com
James,

Good question. I too would welcome any insights.

At the moment, am using very similar approach to the scotch.io examples in link you provided. For form specific validation like simply required, then ng-required attribute on select form elements, and the standard HTML5 required attribute is usually enough. Most resources I have studied on AngularJS appear to be doing something very similar but perhaps the community can offer different ideas.

Are you using JS server side in Node etc?  For that, have started adopting https://github.com/chriso/validator.js  Find this works nicely for most situations, and can be further supported with lodash / underscore utility methods. Could conceivably use that client side too.

Best regards,

Richard.





--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

James Crosswell

unread,
May 22, 2014, 7:00:58 AM5/22/14
to ang...@googlegroups.com
I'm not using JS server side no, so server side validation isn't an issue.

I've just gone with the scotch.io approach for now. It's a little bit laborious coding up all the show/hide logic for the messages but works well. I guess it's the sort of thing some custom directives could do... 

Cheers,
James

Ryan Alberts

unread,
Jan 2, 2015, 3:44:20 PM1/2/15
to ang...@googlegroups.com
I am looking at doing a similar approach of integrating ParsleyJS with Angular.  I am curious if anyone ended up doing it on this thread?

Ryan Alberts

unread,
Jan 22, 2015, 10:14:42 AM1/22/15
to ang...@googlegroups.com
Here is what I ended up with for parsley validation:


Hope it's helpful for someone....

:-)
Reply all
Reply to author
Forward
0 new messages