daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Jan 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top