Advertisement
pastepin57

Untitled

May 8th, 2015
633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 4.33 KB | None | 0 0
  1. this.submitted||!this.optional(a)||this.optional(a)=="dependency-mismatch")){this.element(a)
  2. }}};
  3. jQuery.validator.addMethod("validPostalCode",function(b,a,c){return this.optional(a)||swa.validation.validPostalCode(b,c)
  4. },"Please enter a valid postal code.");
  5. jQuery.validator.addMethod("notInSet",function(b,a,c){return this.optional(a)||swa.validation.notInSet(b,c)
  6. },"You have already entered this value.");
  7. jQuery.validator.addMethod("notContains",function(b,a,c){return this.optional(a)||swa.validation.notContains(b,c)
  8. },"Should not match.");
  9. jQuery.validator.addMethod("optionalDigits",function(b,a,c){return this.optional(a)||swa.validation.optionalDigits(b,a,c)
  10. },"Please enter only digits");
  11. jQuery.validator.addMethod("validDate",function(b,a,c){return this.optional(a)||swa.validation.validDate(b,a,c)
  12. },"Please enter a valid date");
  13. jQuery.validator.addMethod("isBeforeToday",function(b,a,c){return this.optional(a)||swa.validation.isBeforeToday(c)
  14. },"Please enter a date before today");
  15. jQuery.validator.addMethod("lettersWithSpaces",function(b,a,c){return this.optional(a)||swa.validation.lettersWithSpaces(b,a,c)
  16. },"Letters and spaces only please");
  17. jQuery.validator.addMethod("multipleLettersWithSpaces",function(b,a,c){return this.optional(a)||swa.validation.multipleLettersWithSpaces(b,a,c)
  18. },"Letters and spaces only please");
  19. jQuery.validator.addMethod("alphaNumPlusPunctPlusOneSpace",function(b,a,c){return this.optional(a)||swa.validation.alphaNumPlusPunctPlusOneSpace(b,a,c)
  20. },"Letters, numbers and \"#&'()*,-.:;?@_~ only please");
  21. jQuery.validator.addMethod("alphaNumPlusSpace",function(b,a,c){return this.optional(a)||swa.validation.alphaNumPlusSpace(b,a,c)
  22. },"Letters, numbers and spaces only please");
  23. jQuery.validator.addMethod("alphaNumPlusPunctAmpPlusOneSpace",function(b,a,c){return this.optional(a)||swa.validation.alphaNumPlusPunctAmpPlusOneSpace(b,a,c)
  24. },"Letters, numbers and \"#&'()*,-.:;?@_~& only please");
  25. jQuery.validator.addMethod("digitsWithSpaces",function(b,a,c){return this.optional(a)||swa.validation.digitsWithSpaces(b,a,c)
  26. },"Digits and spaces only please");
  27. jQuery.validator.addMethod("alphaNumPlusUnderscore",function(b,a,c){return this.optional(a)||swa.validation.alphaNumPlusUnderscore(b,a)
  28. },"Letters, numbers and/or underscores only please");
  29. jQuery.validator.addMethod("alphanumericWithSpaces",function(b,a){return this.optional(a)||/^[\w]+(\s[\w]+)*$/i.test($.trim(b))
  30. },"Letters, numbers, spaces or underscores only please");
  31. jQuery.validator.addMethod("atleastOneCharacter",function(b,a){return this.optional(a)||/[a-z]/i.test($.trim(b))
  32. },"Please enter a minimum of one character");
  33. jQuery.validator.addMethod("noSpecialCharacters",function(b,a){return this.optional(a)||swa.validation.alphaNumPlusSpecial(b,a)
  34. },"Letters, numbers, or #&!@$%^*(){}[]:;\"'<>,.?/~`+-_= only please");
  35. jQuery.validator.addMethod("alphaNumPlusSpacePlusDashUnderScoreDot",function(b,a){return/^[a-zA-Z0-9\-\.\s_]+$/i.test($.trim(b))
  36. },"Please enter a minimum of one character");
  37. jQuery.validator.addMethod("alphaNumPlusSpacePlusDashUnderScore",function(b,a){return this.optional(a)||/^[a-zA-Z0-9\-\s_]+$/i.test($.trim(b))
  38. },"Letters, digits, spaces, dash and underscore only please");
  39. jQuery.validator.addMethod("alphaNumPlusSpacePlusSpecial",function(b,a){return this.optional(a)||swa.validation.alphaNumPlusSpacePlusSpecial(b,a)
  40. },"Letters, numbers, spaces, or #&!@$%^*(){}[]:;\"'<>,.?/~`+-_= only please");
  41. jQuery.validator.addMethod("revalidate",function(b,a,c){$(c).valid();
  42. return true
  43. });
  44. jQuery.validator.addMethod("companyId",function(b,a){return/^99\d{6}$/i.test($.trim(b))
  45. },"The Company ID is invalid");
  46. jQuery.validator.addMethod("isUsPhoneNumberEmpty",function(b,a,c){return swa.validation.isUsPhoneNumberEmpty(c)
  47. });
  48. jQuery.validator.addMethod("isUsPhoneNumberComplete",function(b,a,c){return swa.validation.isUsPhoneNumberComplete(c)
  49. });
  50. jQuery.validator.addMethod("isUsPhoneNumberNumeric",function(b,a,c){return swa.validation.isUsPhoneNumberNumeric(c)
  51. });
  52. jQuery.validator.addMethod("isUsPhoneNumberEmptyOrComplete",function(b,a,c){return swa.validation.isUsPhoneNumberEmptyOrComplete(c)
  53. });
  54. jQuery.validator.addMethod("isUsPhoneNumberEmptyOrNumeric",function(b,a,c){return swa.validation.isUsPhoneNumberEmptyOrNumeric(c)
  55. });
  56. jQuery.validator.addMethod("isDOBComplete",function(b,a,c){return swa.validation.isDOBComplete(c)
  57. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement