Guest User

Untitled

a guest
Jan 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. var errorHandler = function(errorMap, errorList) {
  2. console.log("count: " + this.errorList.length);
  3.  
  4. var text = "";
  5. if (this.errorList.length > 0) {
  6. text = "Please correct the following errors: ";
  7. for (var i = 0; i < this.errorList.length; i++) {
  8. text += "* " + this.errorList[i].message.errorCode + "<br>";
  9. }
  10. }
  11. $('#oopDialogErrorContainer').html(text);
  12. this.defaultShowErrors();
  13. }
  14.  
  15. $("#myform").validate({
  16. errorLabelContainer: "#messageBox",
  17. wrapper: "li",
  18. submitHandler: function() { alert("Submitted!") }
  19. })
  20.  
  21. $("#myform").validate({
  22. errorContainer: "#messageBox1, #messageBox2",
  23. errorLabelContainer: "#messageBox1 ul",
  24. wrapper: "li", debug:true,
  25. submitHandler: function() { alert("Submitted!") }
  26. })
Add Comment
Please, Sign In to add comment