ARRRRGH... How do I get all the errors created by jquery .validate()
Ahhh yes... So you just validated your awesome form and want to grab all the awesome errors for some awesome reason.
Just add a sprinkling of:
var validator = $("#awesomeForm").validate();
var errors = validator.errorList;
This will give you a list of awesome validator error objects that includes the error message and the actual awesome jquery element object.
You're welcome :)
(I used "awesome" quite a bit)
Written by kurt campher
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#