vendor: 25,563 bytes, lines 1-339
1/*! jQuery Validation Plugin - v1.19.1 - 6/15/2019 2 * https://jqueryvalidation.org/ 3 * Copyright (c) 2019 Jörn Zaefferer; Licensed MIT */ 4! function(a) { 5 "function" == typeof define && define.amd ? define(["jquery", "./jquery.validate.min"], a) : "object" == typeof module && module.exports ? module.exports = a(require("jquery")) : a(jQuery) 6}(function(a) { 7 return function() { 8 function b(a) { 9 return a.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ").replace(/[.(),;:!?%#$'\"_+=\/\-âââ]*/g, "") 10 } 11 a.validator.addMethod("maxWords", function(a, c, d) { 12 return this.optional(c) || b(a).match(/\b\w+\b/g).length <= d 13 }, a.validator.format("Please enter {0} words or less.")), a.validator.addMethod("minWords", function(a, c, d) { 14 return this.optional(c) || b(a).match(/\b\w+\b/g).length >= d 15 }, a.validator.format("Please enter at least {0} words.")), a.validator.addMethod("rangeWords", function(a, c, d) { 16 var e = b(a), 17 f = /\b\w+\b/g; 18 return this.optional(c) || e.match(f).length >= d[0] && e.match(f).length <= d[1] 19 }, a.validator.format("Please enter between {0} and {1} words.")) 20 }(), a.validator.addMethod("abaRoutingNumber", function(a) { 21 var b = 0, 22 c = a.split(""), 23 d = c.length; 24 if (9 !== d) return !1; 25 for (var e = 0; e < d; e += 3) b += 3 * parseInt(c[e], 10) + 7 * parseInt(c[e + 1], 10) + parseInt(c[e + 2], 10); 26 return 0 !== b && b % 10 === 0 27 }, "Please enter a valid routing number."), a.validator.addMethod("accept", function(b, c, d) { 28 var e, f, g, h = "string" == typeof d ? d.replace(/\s/g, "") : "image/*", 29 i = this.optional(c); 30 if (i) return i; 31 if ("file" === a(c).attr("type") && (h = h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&").replace(/,/g, "|").replace(/\/\*/g, "/.*"), c.files && c.files.length)) 32 for (g = new RegExp(".?(" + h + ")$", "i"), e = 0; e < c.files.length; e++) 33 if (f = c.files[e], !f.type.match(g)) return !1; 34 return !0 35 }, a.validator.format("Please enter a value with a valid extension.")), a.validator.addMethod("alphanumeric", function(a, b) { 36 return this.optional(b) || /^\w+$/i.test(a) 37 }, "Letters, numbers, and underscores only please"), a.validator.addMethod("bankaccountNL", function(a, b) { 38 if (this.optional(b)) return !0; 39 if (!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(a)) return !1; 40 var c, d, e, f = a.replace(/ /g, ""), 41 g = 0, 42 h = f.length; 43 for (c = 0; c < h; c++) d = h - c, e = f.substring(c, c + 1), g += d * e; 44 return g % 11 === 0 45 }, "Please specify a valid bank account number"), a.validator.addMethod("bankorgiroaccountNL", function(b, c) { 46 return this.optional(c) || a.validator.methods.bankaccountNL.call(this, b, c) || a.validator.methods.giroaccountNL.call(this, b, c) 47 }, "Please specify a valid bank or giro account number"), a.validator.addMethod("bic", function(a, b) { 48 return this.optional(b) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a.toUpperCase()) 49 }, "Please specify a valid BIC code"), a.validator.addMethod("cifES", function(a, b) { 50 "use strict"; 51 52 function c(a) { 53 return a % 2 === 0 54 } 55 if (this.optional(b)) return !0; 56 var d, e, f, g, h = new RegExp(/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi), 57 i = a.substring(0, 1), 58 j = a.substring(1, 8), 59 k = a.substring(8, 9), 60 l = 0, 61 m = 0, 62 n = 0; 63 if (9 !== a.length || !h.test(a)) return !1; 64 for (d = 0; d < j.length; d++) e = parseInt(j[d], 10), c(d) ? (e *= 2, n += e < 10 ? e : e - 9) : m += e; 65 return l = m + n, f = (10 - l.toString().substr(-1)).toString(), f = parseInt(f, 10) > 9 ? "0" : f, g = "JABCDEFGHI".substr(f, 1).toString(), i.match(/[ABEH]/) ? k === f : i.match(/[KPQS]/) ? k === g : k === f || k === g 66 }, "Please specify a valid CIF number."), a.validator.addMethod("cnhBR", function(a) { 67 if (a = a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, ""), 11 !== a.length) return !1; 68 var b, c, d, e, f, g, h = 0, 69 i = 0; 70 if (b = a.charAt(0), new Array(12).join(b) === a) return !1; 71 for (e = 0, f = 9, g = 0; e < 9; ++e, --f) h += +(a.charAt(e) * f); 72 for (c = h % 11, c >= 10 && (c = 0, i = 2), h = 0, e = 0, f = 1, g = 0; e < 9; ++e, ++f) h += +(a.charAt(e) * f); 73 return d = h % 11, d >= 10 ? d = 0 : d -= i, String(c).concat(d) === a.substr(-2) 74 }, "Please specify a valid CNH number"), a.validator.addMethod("cnpjBR", function(a, b) { 75 "use strict"; 76 if (this.optional(b)) return !0; 77 if (a = a.replace(/[^\d]+/g, ""), 14 !== a.length) return !1; 78 if ("00000000000000" === a || "11111111111111" === a || "22222222222222" === a || "33333333333333" === a || "44444444444444" === a || "55555555555555" === a || "66666666666666" === a || "77777777777777" === a || "88888888888888" === a || "99999999999999" === a) return !1; 79 for (var c = a.length - 2, d = a.substring(0, c), e = a.substring(c), f = 0, g = c - 7, h = c; h >= 1; h--) f += d.charAt(c - h) * g--, g < 2 && (g = 9); 80 var i = f % 11 < 2 ? 0 : 11 - f % 11; 81 if (i !== parseInt(e.charAt(0), 10)) return !1; 82 c += 1, d = a.substring(0, c), f = 0, g = c - 7; 83 for (var j = c; j >= 1; j--) f += d.charAt(c - j) * g--, g < 2 && (g = 9); 84 return i = f % 11 < 2 ? 0 : 11 - f % 11, i === parseInt(e.charAt(1), 10) 85 }, "Please specify a CNPJ value number"), a.validator.addMethod("cpfBR", function(a, b) { 86 "use strict"; 87 if (this.optional(b)) return !0; 88 if (a = a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, ""), 11 !== a.length) return !1; 89 var c, d, e, f, g = 0; 90 if (c = parseInt(a.substring(9, 10), 10), d = parseInt(a.substring(10, 11), 10), e = function(a, b) { 91 var c = 10 * a % 11; 92 return 10 !== c && 11 !== c || (c = 0), c === b 93 }, "" === a || "00000000000" === a || "11111111111" === a || "22222222222" === a || "33333333333" === a || "44444444444" === a || "55555555555" === a || "66666666666" === a || "77777777777" === a || "88888888888" === a || "99999999999" === a) return !1; 94 for (f = 1; f <= 9; f++) g += parseInt(a.substring(f - 1, f), 10) * (11 - f); 95 if (e(g, c)) { 96 for (g = 0, f = 1; f <= 10; f++) g += parseInt(a.substring(f - 1, f), 10) * (12 - f); 97 return e(g, d) 98 } 99 return !1 100 }, "Please specify a valid CPF number"), a.validator.addMethod("creditcard", function(a, b) { 101 if (this.optional(b)) return "dependency-mismatch"; 102 if (/[^0-9 \-]+/.test(a)) return !1; 103 var c, d, e = 0, 104 f = 0, 105 g = !1; 106 if (a = a.replace(/\D/g, ""), a.length < 13 || a.length > 19) return !1; 107 for (c = a.length - 1; c >= 0; c--) d = a.charAt(c), f = parseInt(d, 10), g && (f *= 2) > 9 && (f -= 9), e += f, g = !g; 108 return e % 10 === 0 109 }, "Please enter a valid credit card number."), a.validator.addMethod("creditcardtypes", function(a, b, c) { 110 if (/[^0-9\-]+/.test(a)) return !1; 111 a = a.replace(/\D/g, ""); 112 var d = 0; 113 return c.mastercard && (d |= 1), c.visa && (d |= 2), c.amex && (d |= 4), c.dinersclub && (d |= 8), c.enroute && (d |= 16), c.discover && (d |= 32), c.jcb && (d |= 64), c.unknown && (d |= 128), c.all && (d = 255), 1 & d && (/^(5[12345])/.test(a) || /^(2[234567])/.test(a)) ? 16 === a.length : 2 & d && /^(4)/.test(a) ? 16 === a.length : 4 & d && /^(3[47])/.test(a) ? 15 === a.length : 8 & d && /^(3(0[012345]|[68]))/.test(a) ? 14 === a.length : 16 & d && /^(2(014|149))/.test(a) ? 15 === a.length : 32 & d && /^(6011)/.test(a) ? 16 === a.length : 64 & d && /^(3)/.test(a) ? 16 === a.length : 64 & d && /^(2131|1800)/.test(a) ? 15 === a.length : !!(128 & d) 114 }, "Please enter a valid credit card number."), a.validator.addMethod("currency", function(a, b, c) { 115 var d, e = "string" == typeof c, 116 f = e ? c : c[0], 117 g = !!e || c[1]; 118 return f = f.replace(/,/g, ""), f = g ? f + "]" : f + "]?", d = "^[" + f + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$", d = new RegExp(d), this.optional(b) || d.test(a) 119 }, "Please specify a valid currency"), a.validator.addMethod("dateFA", function(a, b) { 120 return this.optional(b) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a) 121 }, a.validator.messages.date), a.validator.addMethod("dateITA", function(a, b) { 122 var c, d, e, f, g, h = !1, 123 i = /^\d{1,2}\/\d{1,2}\/\d{4}$/; 124 return i.test(a) ? (c = a.split("/"), d = parseInt(c[0], 10), e = parseInt(c[1], 10), f = parseInt(c[2], 10), g = new Date(Date.UTC(f, e - 1, d, 12, 0, 0, 0)), h = g.getUTCFullYear() === f && g.getUTCMonth() === e - 1 && g.getUTCDate() === d) : h = !1, this.optional(b) || h 125 }, a.validator.messages.date), a.validator.addMethod("dateNL", function(a, b) { 126 return this.optional(b) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a) 127 }, a.validator.messages.date), a.validator.addMethod("extension", function(a, b, c) { 128 return c = "string" == typeof c ? c.replace(/,/g, "|") : "png|jpe?g|gif", this.optional(b) || a.match(new RegExp("\\.(" + c + ")$", "i")) 129 }, a.validator.format("Invalid extension.")), a.validator.addMethod("giroaccountNL", function(a, b) { 130 return this.optional(b) || /^[0-9]{1,7}$/.test(a) 131 }, "Please specify a valid giro account number"), a.validator.addMethod("greaterThan", function(b, c, d) { 132 var e = a(d); 133 return this.settings.onfocusout && e.not(".validate-greaterThan-blur").length && e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan", function() { 134 a(c).valid() 135 }), b > e.val() 136 }, "Please enter a greater value."), a.validator.addMethod("greaterThanEqual", function(b, c, d) { 137 var e = a(d); 138 return this.settings.onfocusout && e.not(".validate-greaterThanEqual-blur").length && e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual", function() { 139 a(c).valid() 140 }), b >= e.val() 141 }, "Please enter a greater value."), a.validator.addMethod("iban", function(a, b) { 142 if (this.optional(b)) return !0; 143 var c, d, e, f, g, h, i, j, k, l = a.replace(/ /g, "").toUpperCase(), 144 m = "", 145 n = !0, 146 o = "", 147 p = "", 148 q = 5; 149 if (l.length < q) return !1; 150 if (c = l.substring(0, 2), h = { 151 AL: "\\d{8}[\\dA-Z]{16}", 152 AD: "\\d{8}[\\dA-Z]{12}", 153 AT: "\\d{16}", 154 AZ: "[\\dA-Z]{4}\\d{20}", 155 BE: "\\d{12}", 156 BH: "[A-Z]{4}[\\dA-Z]{14}", 157 BA: "\\d{16}", 158 BR: "\\d{23}[A-Z][\\dA-Z]", 159 BG: "[A-Z]{4}\\d{6}[\\dA-Z]{8}", 160 CR: "\\d{17}", 161 HR: "\\d{17}", 162 CY: "\\d{8}[\\dA-Z]{16}", 163 CZ: "\\d{20}", 164 DK: "\\d{14}", 165 DO: "[A-Z]{4}\\d{20}", 166 EE: "\\d{16}", 167 FO: "\\d{14}", 168 FI: "\\d{14}", 169 FR: "\\d{10}[\\dA-Z]{11}\\d{2}", 170 GE: "[\\dA-Z]{2}\\d{16}", 171 DE: "\\d{18}", 172 GI: "[A-Z]{4}[\\dA-Z]{15}", 173 GR: "\\d{7}[\\dA-Z]{16}", 174 GL: "\\d{14}", 175 GT: "[\\dA-Z]{4}[\\dA-Z]{20}", 176 HU: "\\d{24}", 177 IS: "\\d{22}", 178 IE: "[\\dA-Z]{4}\\d{14}", 179 IL: "\\d{19}", 180 IT: "[A-Z]\\d{10}[\\dA-Z]{12}", 181 KZ: "\\d{3}[\\dA-Z]{13}", 182 KW: "[A-Z]{4}[\\dA-Z]{22}", 183 LV: "[A-Z]{4}[\\dA-Z]{13}", 184 LB: "\\d{4}[\\dA-Z]{20}", 185 LI: "\\d{5}[\\dA-Z]{12}", 186 LT: "\\d{16}", 187 LU: "\\d{3}[\\dA-Z]{13}", 188 MK: "\\d{3}[\\dA-Z]{10}\\d{2}", 189 MT: "[A-Z]{4}\\d{5}[\\dA-Z]{18}", 190 MR: "\\d{23}", 191 MU: "[A-Z]{4}\\d{19}[A-Z]{3}", 192 MC: "\\d{10}[\\dA-Z]{11}\\d{2}", 193 MD: "[\\dA-Z]{2}\\d{18}", 194 ME: "\\d{18}", 195 NL: "[A-Z]{4}\\d{10}", 196 NO: "\\d{11}", 197 PK: "[\\dA-Z]{4}\\d{16}", 198 PS: "[\\dA-Z]{4}\\d{21}", 199 PL: "\\d{24}", 200 PT: "\\d{21}", 201 RO: "[A-Z]{4}[\\dA-Z]{16}", 202 SM: "[A-Z]\\d{10}[\\dA-Z]{12}", 203 SA: "\\d{2}[\\dA-Z]{18}", 204 RS: "\\d{18}", 205 SK: "\\d{20}", 206 SI: "\\d{15}", 207 ES: "\\d{20}", 208 SE: "\\d{20}", 209 CH: "\\d{5}[\\dA-Z]{12}", 210 TN: "\\d{20}", 211 TR: "\\d{5}[\\dA-Z]{17}", 212 AE: "\\d{3}\\d{16}", 213 GB: "[A-Z]{4}\\d{14}", 214 VG: "[\\dA-Z]{4}\\d{16}" 215 }, g = h[c], "undefined" != typeof g && (i = new RegExp("^[A-Z]{2}\\d{2}" + g + "$", ""), !i.test(l))) return !1; 216 for (d = l.substring(4, l.length) + l.substring(0, 4), j = 0; j < d.length; j++) e = d.charAt(j), "0" !== e && (n = !1), n || (m += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e)); 217 for (k = 0; k < m.length; k++) f = m.charAt(k), p = "" + o + f, o = p % 97; 218 return 1 === o 219 }, "Please specify a valid IBAN"), a.validator.addMethod("integer", function(a, b) { 220 return this.optional(b) || /^-?\d+$/.test(a) 221 }, "A positive or negative non-decimal number please"), a.validator.addMethod("ipv4", function(a, b) { 222 return this.optional(b) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(a) 223 }, "Please enter a valid IP v4 address."), a.validator.addMethod("ipv6", function(a, b) { 224 return this.optional(b) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a) 225 }, "Please enter a valid IP v6 address."), a.validator.addMethod("lessThan", function(b, c, d) { 226 var e = a(d); 227 return this.settings.onfocusout && e.not(".validate-lessThan-blur").length && e.addClass("validate-lessThan-blur").on("blur.validate-lessThan", function() { 228 a(c).valid() 229 }), b < e.val() 230 }, "Please enter a lesser value."), a.validator.addMethod("lessThanEqual", function(b, c, d) { 231 var e = a(d); 232 return this.settings.onfocusout && e.not(".validate-lessThanEqual-blur").length && e.addClass("validate-lessThanEqual-blur").on("blur.validate-lessThanEqual", function() { 233 a(c).valid() 234 }), b <= e.val() 235 }, "Please enter a lesser value."), a.validator.addMethod("lettersonly", function(a, b) { 236 return this.optional(b) || /^[a-z]+$/i.test(a) 237 }, "Letters only please"), a.validator.addMethod("letterswithbasicpunc", function(a, b) { 238 return this.optional(b) || /^[a-z\-.,()'"\s]+$/i.test(a) 239 }, "Letters or punctuation only please"), a.validator.addMethod("maxfiles", function(b, c, d) { 240 return !!this.optional(c) || !("file" === a(c).attr("type") && c.files && c.files.length > d) 241 }, a.validator.format("Please select no more than {0} files.")), a.validator.addMethod("maxsize", function(b, c, d) { 242 if (this.optional(c)) return !0; 243 if ("file" === a(c).attr("type") && c.files && c.files.length) 244 for (var e = 0; e < c.files.length; e++) 245 if (c.files[e].size > d) return !1; 246 return !0 247 }, a.validator.format("File size must not exceed {0} bytes each.")), a.validator.addMethod("maxsizetotal", function(b, c, d) { 248 if (this.optional(c)) return !0; 249 if ("file" === a(c).attr("type") && c.files && c.files.length) 250 for (var e = 0, f = 0; f < c.files.length; f++) 251 if (e += c.files[f].size, e > d) return !1; 252 return !0 253 }, a.validator.format("Total size of all files must not exceed {0} bytes.")), a.validator.addMethod("mobileNL", function(a, b) { 254 return this.optional(b) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a) 255 }, "Please specify a valid mobile number"), a.validator.addMethod("mobileRU", function(a, b) { 256 var c = a.replace(/\(|\)|\s+|-/g, ""); 257 return this.optional(b) || c.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test(c) 258 }, "Please specify a valid mobile number"), a.validator.addMethod("mobileUK", function(a, b) { 259 return a = a.replace(/\(|\)|\s+|-/g, ""), this.optional(b) || a.length > 9 && a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/) 260 }, "Please specify a valid mobile number"), a.validator.addMethod("netmask", function(a, b) { 261 return this.optional(b) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a) 262 }, "Please enter a valid netmask."), a.validator.addMethod("nieES", function(a, b) { 263 "use strict"; 264 if (this.optional(b)) return !0; 265 var c, d = new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi), 266 e = "TRWAGMYFPDXBNJZSQVHLCKET", 267 f = a.substr(a.length - 1).toUpperCase(); 268 return a = a.toString().toUpperCase(), !(a.length > 10 || a.length < 9 || !d.test(a)) && (a = a.replace(/^[X]/, "0").replace(/^[Y]/, "1").replace(/^[Z]/, "2"), c = 9 === a.length ? a.substr(0, 8) : a.substr(0, 9), e.charAt(parseInt(c, 10) % 23) === f) 269 }, "Please specify a valid NIE number."), a.validator.addMethod("nifES", function(a, b) { 270 "use strict"; 271 return !!this.optional(b) || (a = a.toUpperCase(), !!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") && (/^[0-9]{8}[A-Z]{1}$/.test(a) ? "TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8, 0) % 23) === a.charAt(8) : !!/^[KLM]{1}/.test(a) && a[8] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8, 1) % 23))) 272 }, "Please specify a valid NIF number."), a.validator.addMethod("nipPL", function(a) { 273 "use strict"; 274 if (a = a.replace(/[^0-9]/g, ""), 10 !== a.length) return !1; 275 for (var b = [6, 5, 7, 2, 3, 4, 5, 6, 7], c = 0, d = 0; d < 9; d++) c += b[d] * a[d]; 276 var e = c % 11, 277 f = 10 === e ? 0 : e; 278 return f === parseInt(a[9], 10) 279 }, "Please specify a valid NIP number."), a.validator.addMethod("nisBR", function(a) { 280 var b, c, d, e, f, g = 0; 281 if (a = a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, ""), 11 !== a.length) return !1; 282 for (c = parseInt(a.substring(10, 11), 10), b = parseInt(a.substring(0, 10), 10), e = 2; e < 12; e++) f = e, 10 === e && (f = 2), 11 === e && (f = 3), g += b % 10 * f, b = parseInt(b / 10, 10); 283 return d = g % 11, d = d > 1 ? 11 - d : 0, c === d 284 }, "Please specify a valid NIS/PIS number"), a.validator.addMethod("notEqualTo", function(b, c, d) { 285 return this.optional(c) || !a.validator.methods.equalTo.call(this, b, c, d) 286 }, "Please enter a different value, values must not be the same."), a.validator.addMethod("nowhitespace", function(a, b) { 287 return this.optional(b) || /^\S+$/i.test(a) 288 }, "No white space please"), a.validator.addMethod("pattern", function(a, b, c) { 289 return !!this.optional(b) || ("string" == typeof c && (c = new RegExp("^(?:" + c + ")$")), c.test(a)) 290 }, "Invalid format."), a.validator.addMethod("phoneNL", function(a, b) { 291 return this.optional(b) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a) 292 }, "Please specify a valid phone number."), a.validator.addMethod("phonePL", function(a, b) { 293 a = a.replace(/\s+/g, ""); 294 var c = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/; 295 return this.optional(b) || c.test(a) 296 }, "Please specify a valid phone number"), a.validator.addMethod("phonesUK", function(a, b) { 297 return a = a.replace(/\(|\)|\s+|-/g, ""), this.optional(b) || a.length > 9 && a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/) 298 }, "Please specify a valid uk phone number"), a.validator.addMethod("phoneUK", function(a, b) { 299 return a = a.replace(/\(|\)|\s+|-/g, ""), this.optional(b) || a.length > 9 && a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/) 300 }, "Please specify a valid phone number"), a.validator.addMethod("phoneUS", function(a, b) { 301 return a = a.replace(/\s+/g, ""), this.optional(b) || a.length > 9 && a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/) 302 }, "Please specify a valid phone number"), a.validator.addMethod("postalcodeBR", function(a, b) { 303 return this.optional(b) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a) 304 }, "Informe um CEP válido."), a.validator.addMethod("postalCodeCA", function(a, b) { 305 return this.optional(b) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a) 306 }, "Please specify a valid postal code"), a.validator.addMethod("postalcodeIT", function(a, b) { 307 return this.optional(b) || /^\d{5}$/.test(a) 308 }, "Please specify a valid postal code"), a.validator.addMethod("postalcodeNL", function(a, b) { 309 return this.optional(b) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a) 310 }, "Please specify a valid postal code"), a.validator.addMethod("postcodeUK", function(a, b) { 311 return this.optional(b) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a) 312 }, "Please specify a valid UK postcode"), a.validator.addMethod("require_from_group", function(b, c, d) { 313 var e = a(d[1], c.form), 314 f = e.eq(0), 315 g = f.data("valid_req_grp") ? f.data("valid_req_grp") : a.extend({}, this), 316 h = e.filter(function() { 317 return g.elementValue(this) 318 }).length >= d[0]; 319 return f.data("valid_req_grp", g), a(c).data("being_validated") || (e.data("being_validated", !0), e.each(function() { 320 g.element(this) 321 }), e.data("being_validated", !1)), h 322 }, a.validator.format("Please fill at least {0} of these fields.")), a.validator.addMethod("skip_or_fill_minimum", function(b, c, d) { 323 var e = a(d[1], c.form), 324 f = e.eq(0), 325 g = f.data("valid_skip") ? f.data("valid_skip") : a.extend({}, this), 326 h = e.filter(function() { 327 return g.elementValue(this) 328 }).length, 329 i = 0 === h || h >= d[0]; 330 return f.data("valid_skip", g), a(c).data("being_validated") || (e.data("being_validated", !0), e.each(function() { 331 g.element(this) 332 }), e.data("being_validated", !1)), i 333 }, a.validator.format("Please either skip these fields or fill at least {0} of them.")), a.validator.addMethod("stateUS", function(a, b, c) { 334 var d, e = "undefined" == typeof c, 335 f = !e && "undefined" != typeof c.caseSensitive && c.caseSensitive, 336 g = !e && "undefined" != typeof c.includeTerritories && c.includeTerritories, 337 h = !e && "undefined" != typeof c.includeMilitary && c.includeMilitary; 338 return d = g || h ? g && h ? "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$" : g ? "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$" : "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$" : "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$", d = f ? new RegExp(d) : new RegExp(d, "i"), this.optional(b) || d.test(a) 339 }
339, "Please specify a valid state"), a.validator.addMethod("strippedminlength", function(b, c, d) { 340 return a(b).text().length >= d 341 }, a.validator.format("Please enter at least {0} characters")), a.validator.addMethod("time", function(a, b) { 342 return this.optional(b) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a) 343 }, "Please enter a valid time, between 00:00 and 23:59"), a.validator.addMethod("time12h", function(a, b) { 344 return this.optional(b) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a) 345 }, "Please enter a valid time in 12-hour am/pm format"), a.validator.addMethod("url2", function(a, b) { 346 return this.optional(b) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a) 347 }, a.validator.messages.url), a.validator.addMethod("vinUS", function(a) { 348 if (17 !== a.length) return !1; 349 var b, c, d, e, f, g, h = ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], 350 i = [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9], 351 j = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2], 352 k = 0; 353 for (b = 0; b < 17; b++) { 354 if (e = j[b], d = a.slice(b, b + 1), 8 === b && (g = d), isNaN(d)) { 355 for (c = 0; c < h.length; c++) 356 if (d.toUpperCase() === h[c]) { 357 d = i[c], d *= e, isNaN(g) && 8 === c && (g = h[c]); 358 break 359 } 360 } else d *= e; 361 k += d 362 } 363 return f = k % 11, 10 === f && (f = "X"), f === g 364 }
364, "The specified vehicle identification number (VIN) is invalid."), a.validator.addMethod("zipcodeUS", function(a, b) { 365 return this.optional(b) || /^\d{5}(-\d{4})?$/.test(a) 366 }, "The specified US ZIP Code is invalid"), a.validator.addMethod("ziprange", function(a, b) { 367 return this.optional(b) || /^90[2-5]\d\{2\}-\d{4}$/.test(a) 368 }, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx"), a 369});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.