From 135bf0cb5db5c829330767948da8fa2a6a04e1eb Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Sat, 9 Dec 2017 00:29:39 +0700 Subject: [PATCH 1/7] update source code support locales --- validate.js | 167 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 107 insertions(+), 60 deletions(-) diff --git a/validate.js b/validate.js index 610d0bc..bfd770c 100644 --- a/validate.js +++ b/validate.js @@ -793,28 +793,22 @@ // Is checks if (v.isNumber(is) && length !== is) { - err = options.wrongLength || - this.wrongLength || - "is the wrong length (should be %{count} characters)"; + err = v.lang("length.wrongLength", options.wrongLength || this.wrongLength); errors.push(v.format(err, {count: is})); } if (v.isNumber(minimum) && length < minimum) { - err = options.tooShort || - this.tooShort || - "is too short (minimum is %{count} characters)"; + err = v.lang("length.tooShort", options.tooShort || this.tooShort); errors.push(v.format(err, {count: minimum})); } if (v.isNumber(maximum) && length > maximum) { - err = options.tooLong || - this.tooLong || - "is too long (maximum is %{count} characters)"; + err = v.lang("length.tooLong", options.tooLong || this.tooLong); errors.push(v.format(err, {count: maximum})); } if (errors.length > 0) { - return options.message || errors; + return v.lang(options.message, options) || errors; } }, numericality: function(value, options, attribute, attributes, globalOptions) { @@ -849,11 +843,10 @@ pattern += "$"; if (!(new RegExp(pattern).test(value))) { - return options.message || - options.notValid || - this.notValid || - this.message || - "must be a valid number"; + return v.lang( + "numericality.notValidStrict", + options.message || options.notValid || this.notValid || this.message + ); } } @@ -864,21 +857,19 @@ // If it's not a number we shouldn't continue since it will compare it. if (!v.isNumber(value)) { - return options.message || - options.notValid || - this.notValid || - this.message || - "is not a number"; + return v.lang( + "numericality.notValid", + options.message || options.notValid || this.notValid || this.message + ); } // Same logic as above, sort of. Don't bother with comparisons if this // doesn't pass. if (options.onlyInteger && !v.isInteger(value)) { - return options.message || - options.notInteger || - this.notInteger || - this.message || - "must be an integer"; + return v.lang( + "numericality.notInteger", + options.message || options.notInteger || this.notInteger || this.message + ); } for (name in checks) { @@ -888,10 +879,14 @@ // For example the greaterThan check uses the message from // this.notGreaterThan so we capitalize the name and prepend "not" var key = "not" + v.capitalize(name); - var msg = options[key] || - this[key] || - this.message || - "must be %{type} %{count}"; + var msg = v.lang( + "numericality.check", + options.message || options.notInteger || this.notInteger || this.message + ) + || v.lang( + "numericality." + key, + options.message || options[key] || this[key] || this.message + ); errors.push(v.format(msg, { count: count, @@ -901,20 +896,14 @@ } if (options.odd && value % 2 !== 1) { - errors.push(options.notOdd || - this.notOdd || - this.message || - "must be odd"); + errors.push(v.lang("numericality.notOdd", this.notOdd || this.message)); } if (options.even && value % 2 !== 0) { - errors.push(options.notEven || - this.notEven || - this.message || - "must be even"); + errors.push(v.lang("numericality.notEven", this.notEven || this.message)); } if (errors.length) { - return options.message || errors; + return v.lang(options.message, options) || errors; } }, datetime: v.extend(function(value, options) { @@ -939,18 +928,12 @@ // 86400000 is the number of milliseconds in a day, this is used to remove // the time from the date if (isNaN(value) || options.dateOnly && value % 86400000 !== 0) { - err = options.notValid || - options.message || - this.notValid || - "must be a valid date"; + err = v.lang("datetime.notValid", options.notValid || options.message || this.notValid); return v.format(err, {value: arguments[0]}); } if (!isNaN(earliest) && value < earliest) { - err = options.tooEarly || - options.message || - this.tooEarly || - "must be no earlier than %{date}"; + err = v.lang("datetime.tooEarly", options.tooEarly || options.message || this.tooEarly); err = v.format(err, { value: this.format(value, options), date: this.format(earliest, options) @@ -959,10 +942,7 @@ } if (!isNaN(latest) && value > latest) { - err = options.tooLate || - options.message || - this.tooLate || - "must be no later than %{date}"; + err = v.lang("datetime.tooLate", options.tooLate || options.message || this.tooLate); err = v.format(err, { date: this.format(latest, options), value: this.format(value, options) @@ -988,7 +968,7 @@ options = v.extend({}, this.options, options); - var message = options.message || this.message || "is invalid" + var message = v.lang("format.notValid", options.message || this.message) , pattern = options.pattern , match; @@ -1020,9 +1000,7 @@ if (v.contains(options.within, value)) { return; } - var message = options.message || - this.message || - "^%{value} is not included in the list"; + var message = v.lang("inclusion.notValid", options.message || this.message); return v.format(message, {value: value}); }, exclusion: function(value, options) { @@ -1037,7 +1015,7 @@ if (!v.contains(options.within, value)) { return; } - var message = options.message || this.message || "^%{value} is restricted"; + var message = v.lang("exclusion.notValid", options.message || this.message); if (v.isString(options.within[value])) { value = options.within[value]; } @@ -1045,7 +1023,7 @@ }, email: v.extend(function(value, options) { options = v.extend({}, this.options, options); - var message = options.message || this.message || "is not a valid email"; + var message = v.lang("email.notValid", options.message || this.message); // Empty values are fine if (!v.isDefined(value)) { return; @@ -1068,9 +1046,7 @@ options = {attribute: options}; } options = v.extend({}, this.options, options); - var message = options.message || - this.message || - "is not equal to %{attribute}"; + var message = v.lang("equality.notValid", options.message || this.message); if (v.isEmpty(options.attribute) || !v.isString(options.attribute)) { throw new Error("The attribute must be a non empty string"); @@ -1097,7 +1073,7 @@ options = v.extend({}, this.options, options); - var message = options.message || this.message || "is not a valid url" + var message = v.lang("url.notValid", options.message || this.message) , schemes = options.schemes || this.schemes || ['http', 'https'] , allowLocal = options.allowLocal || this.allowLocal || false; @@ -1234,6 +1210,77 @@ } }; + validate.locales = { + en: { + unknownValidator: "Unknown validator %{name}", + unknownFormat: "Unknown format %{format}", + length: { + wrongLength: "is the wrong length (should be %{count} characters)", + tooShort: "is too short (minimum is %{count} characters)", + tooLong: "is too long (maximum is %{count} characters)" + }, + numericality: { + notValidStrict: "must be a valid number", + notValid: "is not a number", + notInteger: "must be an integer", + check: "must be %{type} %{count}", + notOdd: "must be odd", + notEven: "must be even" + }, + datetime: { + notValid: "must be a valid date", + tooEarly: "must be no earlier than %{date}", + tooLate: "must be no later than %{date}" + }, + format: { + notValid: "is invalid" + }, + inclusion: { + notValid: "^%{value} is not included in the list" + }, + exclusion: { + notValid: "^%{value} is restricted" + }, + email: { + notValid: "is not a valid email" + }, + equality: { + notValid: "is not equal to %{attribute}" + }, + url: { + notValid: "is not a valid url" + } + } + }; + + validate.setLocale = function (locale, message) { + if (!message && v.isObject(locale)) { + for (var localeKey in locale) { + if(locale.hasOwnProperty(localeKey)){ + validate.locales[localeKey] = locale[localeKey]; + } + } + return; + } + validate.locales[locale] = message; + }; + + validate.lang = function (langKey, locale, options) { + options = v.extend({}, v.options, options); + if (!options.locale) { + options.locale = "en"; + } + if (v.isString(locale)) { + return locale; + } + if (v.isObject(locale)) { + return locale[options.locale]; + } + var locales = v.extend({}, v.locales["en"], v.locales[options.locale]); + + return v.getDeepObjectValue(locales, langKey); + }; + validate.exposeModule(validate, this, exports, module, define); }).call(this, typeof exports !== 'undefined' ? /* istanbul ignore next */ exports : null, From 2dc031154d6f78c0b78f0ca830eaad85f7f0b572 Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Sat, 9 Dec 2017 00:38:45 +0700 Subject: [PATCH 2/7] update code style, update typing --- validate.d.ts | 9 +++++++++ validate.js | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/validate.d.ts b/validate.d.ts index 2f983cb..7511ce7 100644 --- a/validate.d.ts +++ b/validate.d.ts @@ -17,6 +17,13 @@ declare namespace validate { trim?: boolean; } + export interface ValidateLocaleOption { + locale?: string; + [property: string]: any; + } + + export type ValidateLocale = string | { [locale: string]: any }; + export interface ValidateJS { (attributes: any, constraints: any, options?: ValidateOption): any; validate(attributes: any, constraints: any, options?: ValidateOption): any; @@ -48,6 +55,8 @@ declare namespace validate { isString(value: any): boolean; prettify(value: string): string; result(value: any, ...args: any[]): any; + setLocale(locale: ValidateLocale, message?: string): void; + lang(langKey: string, locales?: ValidateLocale, options?: ValidateLocaleOption): void; } } diff --git a/validate.js b/validate.js index bfd770c..536119d 100644 --- a/validate.js +++ b/validate.js @@ -1265,18 +1265,18 @@ validate.locales[locale] = message; }; - validate.lang = function (langKey, locale, options) { + validate.lang = function (langKey, locales, options) { options = v.extend({}, v.options, options); if (!options.locale) { options.locale = "en"; } - if (v.isString(locale)) { - return locale; + if (v.isString(locales)) { + return locales; } - if (v.isObject(locale)) { - return locale[options.locale]; + if (v.isObject(locales)) { + return locales[options.locale]; } - var locales = v.extend({}, v.locales["en"], v.locales[options.locale]); + locales = v.extend({}, v.locales["en"], v.locales[options.locale]); return v.getDeepObjectValue(locales, langKey); }; From bace909958baa30a9c640b6e0dd34bf505735a90 Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Tue, 6 Feb 2018 00:38:28 +0700 Subject: [PATCH 3/7] fix jshint --- validate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/validate.js b/validate.js index 536119d..fd01560 100644 --- a/validate.js +++ b/validate.js @@ -880,10 +880,10 @@ // this.notGreaterThan so we capitalize the name and prepend "not" var key = "not" + v.capitalize(name); var msg = v.lang( - "numericality.check", + 'numericality.check', options.message || options.notInteger || this.notInteger || this.message - ) - || v.lang( + ) || + v.lang( "numericality." + key, options.message || options[key] || this[key] || this.message ); @@ -1276,7 +1276,7 @@ if (v.isObject(locales)) { return locales[options.locale]; } - locales = v.extend({}, v.locales["en"], v.locales[options.locale]); + locales = v.extend({}, v.locales.en, v.locales[options.locale]); return v.getDeepObjectValue(locales, langKey); }; From 432efcbdb5bcd227bf06694efa32ebfc8a7dbc10 Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Tue, 24 Apr 2018 00:59:44 +0700 Subject: [PATCH 4/7] fix message flow unit test --- validate.js | 56 ++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/validate.js b/validate.js index fd01560..373de3d 100644 --- a/validate.js +++ b/validate.js @@ -788,27 +788,27 @@ value = tokenizer(value); var length = value.length; if(!v.isNumber(length)) { - return options.message || this.notValid || "has an incorrect length"; + return v.lang("length.notValid", options.message || this.notValid || this.message); } // Is checks if (v.isNumber(is) && length !== is) { - err = v.lang("length.wrongLength", options.wrongLength || this.wrongLength); + err = v.lang("length.wrongLength", options.wrongLength || options.message || this.wrongLength || this.message); errors.push(v.format(err, {count: is})); } if (v.isNumber(minimum) && length < minimum) { - err = v.lang("length.tooShort", options.tooShort || this.tooShort); + err = v.lang("length.tooShort", options.tooShort || options.message || this.tooShort || this.message); errors.push(v.format(err, {count: minimum})); } if (v.isNumber(maximum) && length > maximum) { - err = v.lang("length.tooLong", options.tooLong || this.tooLong); + err = v.lang("length.tooLong", options.tooLong || options.message || this.tooLong || this.message); errors.push(v.format(err, {count: maximum})); } if (errors.length > 0) { - return v.lang(options.message, options) || errors; + return v.lang("length.message", options.message || this.message) || errors; } }, numericality: function(value, options, attribute, attributes, globalOptions) { @@ -845,7 +845,7 @@ if (!(new RegExp(pattern).test(value))) { return v.lang( "numericality.notValidStrict", - options.message || options.notValid || this.notValid || this.message + options.notValid || options.message || this.notValid || this.message ); } } @@ -859,7 +859,7 @@ if (!v.isNumber(value)) { return v.lang( "numericality.notValid", - options.message || options.notValid || this.notValid || this.message + options.notValid || options.message || this.notValid || this.message ); } @@ -868,7 +868,7 @@ if (options.onlyInteger && !v.isInteger(value)) { return v.lang( "numericality.notInteger", - options.message || options.notInteger || this.notInteger || this.message + options.notInteger || options.message || this.notInteger || this.message ); } @@ -880,12 +880,12 @@ // this.notGreaterThan so we capitalize the name and prepend "not" var key = "not" + v.capitalize(name); var msg = v.lang( - 'numericality.check', - options.message || options.notInteger || this.notInteger || this.message + "numericality." + key, + options.message || options[key] || this[key] || this.message ) || v.lang( - "numericality." + key, - options.message || options[key] || this[key] || this.message + 'numericality.check', + options.notInteger || options.message || this.notInteger || this.message ); errors.push(v.format(msg, { @@ -896,14 +896,14 @@ } if (options.odd && value % 2 !== 1) { - errors.push(v.lang("numericality.notOdd", this.notOdd || this.message)); + errors.push(v.lang("numericality.notOdd", options.message || options.notOdd || this.notOdd || this.message)); } if (options.even && value % 2 !== 0) { - errors.push(v.lang("numericality.notEven", this.notEven || this.message)); + errors.push(v.lang("numericality.notEven", options.message || options.notEven || this.notEven || this.message)); } if (errors.length) { - return v.lang(options.message, options) || errors; + return v.lang("numericality.message", options.message) || errors; } }, datetime: v.extend(function(value, options) { @@ -928,12 +928,12 @@ // 86400000 is the number of milliseconds in a day, this is used to remove // the time from the date if (isNaN(value) || options.dateOnly && value % 86400000 !== 0) { - err = v.lang("datetime.notValid", options.notValid || options.message || this.notValid); + err = v.lang("datetime.notValid", options.notValid || options.message || this.notValid || this.message); return v.format(err, {value: arguments[0]}); } if (!isNaN(earliest) && value < earliest) { - err = v.lang("datetime.tooEarly", options.tooEarly || options.message || this.tooEarly); + err = v.lang("datetime.tooEarly", options.tooEarly || options.message || this.tooEarly || this.message); err = v.format(err, { value: this.format(value, options), date: this.format(earliest, options) @@ -942,7 +942,7 @@ } if (!isNaN(latest) && value > latest) { - err = v.lang("datetime.tooLate", options.tooLate || options.message || this.tooLate); + err = v.lang("datetime.tooLate", options.tooLate || options.message || this.tooLate || this.message); err = v.format(err, { date: this.format(latest, options), value: this.format(value, options) @@ -1015,7 +1015,7 @@ if (!v.contains(options.within, value)) { return; } - var message = v.lang("exclusion.notValid", options.message || this.message); + var message = v.lang("exclusion.notValid", options.notValid || options.message || this.message); if (v.isString(options.within[value])) { value = options.within[value]; } @@ -1023,7 +1023,7 @@ }, email: v.extend(function(value, options) { options = v.extend({}, this.options, options); - var message = v.lang("email.notValid", options.message || this.message); + var message = v.lang("email.notValid", options.notValid || options.message || this.message); // Empty values are fine if (!v.isDefined(value)) { return; @@ -1046,7 +1046,7 @@ options = {attribute: options}; } options = v.extend({}, this.options, options); - var message = v.lang("equality.notValid", options.message || this.message); + var message = v.lang("equality.notValid", options.notValid || options.message || this.message); if (v.isEmpty(options.attribute) || !v.isString(options.attribute)) { throw new Error("The attribute must be a non empty string"); @@ -1073,7 +1073,7 @@ options = v.extend({}, this.options, options); - var message = v.lang("url.notValid", options.message || this.message) + var message = v.lang("url.notValid", options.notValid || options.message || this.message) , schemes = options.schemes || this.schemes || ['http', 'https'] , allowLocal = options.allowLocal || this.allowLocal || false; @@ -1215,9 +1215,10 @@ unknownValidator: "Unknown validator %{name}", unknownFormat: "Unknown format %{format}", length: { + notValid: "has an incorrect length", wrongLength: "is the wrong length (should be %{count} characters)", tooShort: "is too short (minimum is %{count} characters)", - tooLong: "is too long (maximum is %{count} characters)" + tooLong: "is too long (maximum is %{count} characters)", }, numericality: { notValidStrict: "must be a valid number", @@ -1266,13 +1267,16 @@ }; validate.lang = function (langKey, locales, options) { - options = v.extend({}, v.options, options); - if (!options.locale) { - options.locale = "en"; + if (v.isFunction(locales)) { + return locales; } if (v.isString(locales)) { return locales; } + options = v.extend({}, v.options, options); + if (!options.locale) { + options.locale = "en"; + } if (v.isObject(locales)) { return locales[options.locale]; } From 920af96fc477cc8139479214452157c6af3177d6 Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Tue, 24 Apr 2018 01:03:56 +0700 Subject: [PATCH 5/7] fix message flow unit test --- validate.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/validate.js b/validate.js index 373de3d..68392a9 100644 --- a/validate.js +++ b/validate.js @@ -788,7 +788,7 @@ value = tokenizer(value); var length = value.length; if(!v.isNumber(length)) { - return v.lang("length.notValid", options.message || this.notValid || this.message); + return v.lang("length.notValid", options.notValid || options.message || this.notValid || this.message); } // Is checks @@ -881,11 +881,11 @@ var key = "not" + v.capitalize(name); var msg = v.lang( "numericality." + key, - options.message || options[key] || this[key] || this.message + options[key] || options.message || this[key] || this.message ) || v.lang( 'numericality.check', - options.notInteger || options.message || this.notInteger || this.message + options.message || this.message ); errors.push(v.format(msg, { @@ -896,10 +896,10 @@ } if (options.odd && value % 2 !== 1) { - errors.push(v.lang("numericality.notOdd", options.message || options.notOdd || this.notOdd || this.message)); + errors.push(v.lang("numericality.notOdd", options.notOdd || options.message || this.notOdd || this.message)); } if (options.even && value % 2 !== 0) { - errors.push(v.lang("numericality.notEven", options.message || options.notEven || this.notEven || this.message)); + errors.push(v.lang("numericality.notEven", options.notEven || options.message || this.notEven || this.message)); } if (errors.length) { From f267dd03d8b0406eb959108877a39c81259d1e36 Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Tue, 24 Apr 2018 01:07:12 +0700 Subject: [PATCH 6/7] remove unused variable --- validate.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/validate.js b/validate.js index 68392a9..f254357 100644 --- a/validate.js +++ b/validate.js @@ -22,9 +22,7 @@ var validate = function(attributes, constraints, options) { options = v.extend({}, v.options, options); - var results = v.runValidations(attributes, constraints, options) - , attr - , validator; + var results = v.runValidations(attributes, constraints, options); if (results.some(function(r) { return v.isPromise(r.error); })) { throw new Error("Use validate.async if you want support for promises"); @@ -695,7 +693,6 @@ function buildObjectWhitelist(whitelist) { var ow = {} - , lastObject , attr; for (attr in whitelist) { if (!whitelist[attr]) { @@ -770,7 +767,7 @@ return options.message || this.message || "can't be blank"; } }, - length: function(value, options, attribute) { + length: function(value, options) { // Empty values are allowed if (!v.isDefined(value)) { return; From eedfef490f0ca2e6a50ffcdedfc19ab6811e931d Mon Sep 17 00:00:00 2001 From: thinhbuzz Date: Tue, 24 Apr 2018 21:52:28 +0700 Subject: [PATCH 7/7] build product --- docs/validate.html | 398 ++++++++++++++++++++++++++++----------------- validate.min.js | 2 +- validate.min.map | 2 +- 3 files changed, 253 insertions(+), 149 deletions(-) diff --git a/docs/validate.html b/docs/validate.html index 96360c0..452b8ba 100644 --- a/docs/validate.html +++ b/docs/validate.html @@ -69,9 +69,7 @@

validate.js

  var validate = function(attributes, constraints, options) {
     options = v.extend({}, v.options, options);
 
-    var results = v.runValidations(attributes, constraints, options)
-      , attr
-      , validator;
+    var results = v.runValidations(attributes, constraints, options);
 
     if (results.some(function(r) { return v.isPromise(r.error); })) {
       throw new Error("Use validate.async if you want support for promises");
@@ -123,11 +121,11 @@ 

validate.js

    version: {
-      major: 0,
-      minor: 12,
-      patch: 0,
-      metadata: null,
-      toString: function() {
+      major: 0,
+      minor: 12,
+      patch: 0,
+      metadata: "development",
+      toString: function() {
         var version = v.format("%{major}.%{minor}.%{patch}", v.version);
         if (!v.isEmpty(v.version.metadata)) {
           version += "+" + v.version.metadata;
@@ -167,7 +165,7 @@ 

validate.js

    Promise: typeof Promise !== "undefined" ? Promise : /* istanbul ignore next */ null,
 
-    EMPTY_STRING_REGEXP: /^\s*$/,
+ EMPTY_STRING_REGEXP: /^\s*$/,
@@ -237,7 +235,7 @@

validate.js

validator = v.validators[validatorName]; if (!validator) { - error = v.format("Unknown validator %{name}", {name: validatorName}); + error = v.format("Unknown validator %{name}", {name: validatorName}); throw new Error(error); } @@ -265,13 +263,13 @@

validate.js

continue; } results.push({ - attribute: attr, - value: value, - validator: validatorName, - globalOptions: options, - attributes: attributes, - options: validatorOptions, - error: validator.call(validator, + attribute: attr, + value: value, + validator: validatorName, + globalOptions: options, + attributes: attributes, + options: validatorOptions, + error: validator.call(validator, value, validatorOptions, attr, @@ -370,12 +368,12 @@

validate.js

}); }, - single: function(value, constraints, options) { + single: function(value, constraints, options) { options = v.extend({}, v.single.options, options, { - format: "flat", - fullMessages: false + format: "flat", + fullMessages: false }); - return v({single: value}, {single: constraints}, options); + return v({single: value}, {single: constraints}, options); },
@@ -602,11 +600,11 @@

validate.js

return !!p && v.isFunction(p.then); }, - isJqueryElement: function(o) { + isJqueryElement: function(o) { return o && v.isString(o.jquery); }, - isDomElement: function(o) { + isDomElement: function(o) { if (!o) { return false; } @@ -644,7 +642,7 @@

validate.js

} }, - isEmpty: function(value) { + isEmpty: function(value) { var attr; @@ -765,7 +763,7 @@

validate.js

Formats the specified strings with the given values like so:

-
format("Foo: %{foo}", {foo: "bar"}) // "Foo bar"
+
format("Foo: %{foo}", {foo: "bar"}) // "Foo bar"
 

If you want to write %{…} without having it replaced simply prefix it with % like this Foo: %%{foo} and it will be returned as "Foo: %{foo}"

@@ -928,16 +926,16 @@

validate.js

.toLowerCase(); }, - stringifyValue: function(value, options) { + stringifyValue: function(value, options) { var prettify = options && options.prettify || v.prettify; return prettify(value); }, - isString: function(value) { + isString: function(value) { return typeof value === 'string'; }, - isArray: function(value) { + isArray: function(value) { return {}.toString.call(value) === '[object Array]'; },
@@ -959,7 +957,7 @@

validate.js

return v.isObject(value) && !v.isArray(value) && !v.isFunction(value); }, - contains: function(obj, value) { + contains: function(obj, value) { if (!v.isDefined(obj)) { return false; } @@ -969,7 +967,7 @@

validate.js

return value in obj; }, - unique: function(array) { + unique: function(array) { if (!v.isArray(array)) { return array; } @@ -978,7 +976,7 @@

validate.js

}); }, - forEachKeyInKeypath: function(object, keypath, callback) { + forEachKeyInKeypath: function(object, keypath, callback) { if (!v.isString(keypath)) { return undefined; } @@ -1018,7 +1016,7 @@

validate.js

return callback(object, key, true); }, - getDeepObjectValue: function(obj, keypath) { + getDeepObjectValue: function(obj, keypath) { if (!v.isObject(obj)) { return undefined; } @@ -1075,7 +1073,7 @@

validate.js

continue; } - name = input.name.replace(/\./g, "\\\\."); + var name = input.name.replace(/\./g, "\\\\."); value = v.sanitizeFormValue(input.value, options); if (input.type === "number") { value = value ? +value : null; @@ -1111,7 +1109,7 @@

validate.js

} } } else { - var _val = typeof input.options[input.selectedIndex] !== 'undefined' ? input.options[input.selectedIndex].value : ''; + var _val = typeof input.options[input.selectedIndex] !== 'undefined' ? input.options[input.selectedIndex].value : /* istanbul ignore next */ ''; value = v.sanitizeFormValue(_val, options); } values[input.name] = value; @@ -1120,7 +1118,7 @@

validate.js

return values; }, - sanitizeFormValue: function(value, options) { + sanitizeFormValue: function(value, options) { if (options.trim && v.isString(value)) { value = value.trim(); } @@ -1131,7 +1129,7 @@

validate.js

return value; }, - capitalize: function(str) { + capitalize: function(str) { if (!v.isString(str)) { return str; } @@ -1194,7 +1192,7 @@

validate.js

        if (v.isArray(error.error)) {
           error.error.forEach(function(msg) {
-            ret.push(v.extend({}, error, {error: msg}));
+            ret.push(v.extend({}, error, {error: msg}));
           });
         } else {
           ret.push(error);
@@ -1242,9 +1240,9 @@ 

validate.js

} error = error.replace(/\\\^/g, "^"); error = v.format(error, { - value: v.stringifyValue(errorInfo.value, options) + value: v.stringifyValue(errorInfo.value, options) }); - ret.push(v.extend({}, errorInfo, {error: error})); + ret.push(v.extend({}, errorInfo, {error: error})); }); return ret; },
@@ -1302,7 +1300,7 @@

validate.js

}); }, - cleanAttributes: function(attributes, whitelist) { + cleanAttributes: function(attributes, whitelist) { function whitelistCreator(obj, key, last) { if (v.isObject(obj[key])) { return obj[key]; @@ -1312,7 +1310,6 @@

validate.js

function buildObjectWhitelist(whitelist) { var ow = {} - , lastObject , attr; for (attr in whitelist) { if (!whitelist[attr]) { @@ -1352,7 +1349,7 @@

validate.js

return cleanRecursive(attributes, whitelist); }, - exposeModule: function(validate, root, exports, module, define) { + exposeModule: function(validate, root, exports, module, define) { if (exports) { if (module && module.exports) { exports = module.exports = validate; @@ -1366,13 +1363,13 @@

validate.js

} }, - warn: function(msg) { + warn: function(msg) { if (typeof console !== "undefined" && console.warn) { console.warn("[validate.js] " + msg); } }, - error: function(msg) { + error: function(msg) { if (typeof console !== "undefined" && console.error) { console.error("[validate.js] " + msg); } @@ -1400,7 +1397,7 @@

validate.js

return options.message || this.message || "can't be blank"; } }, - length: function(value, options, attribute) { + length: function(value, options) { @@ -1431,8 +1428,7 @@

validate.js

value = tokenizer(value); var length = value.length; if(!v.isNumber(length)) { - v.error(v.format("Attribute %{attr} has a non numeric value for `length`", {attr: attribute})); - return options.message || this.notValid || "has an incorrect length"; + return v.lang("length.notValid", options.notValid || options.message || this.notValid || this.message); } @@ -1449,31 +1445,25 @@

validate.js

      if (v.isNumber(is) && length !== is) {
-        err = options.wrongLength ||
-          this.wrongLength ||
-          "is the wrong length (should be %{count} characters)";
-        errors.push(v.format(err, {count: is}));
+        err = v.lang("length.wrongLength", options.wrongLength || options.message || this.wrongLength || this.message);
+        errors.push(v.format(err, {count: is}));
       }
 
       if (v.isNumber(minimum) && length < minimum) {
-        err = options.tooShort ||
-          this.tooShort ||
-          "is too short (minimum is %{count} characters)";
-        errors.push(v.format(err, {count: minimum}));
+        err = v.lang("length.tooShort", options.tooShort || options.message || this.tooShort || this.message);
+        errors.push(v.format(err, {count: minimum}));
       }
 
       if (v.isNumber(maximum) && length > maximum) {
-        err = options.tooLong ||
-          this.tooLong ||
-          "is too long (maximum is %{count} characters)";
-        errors.push(v.format(err, {count: maximum}));
+        err = v.lang("length.tooLong", options.tooLong || options.message || this.tooLong || this.message);
+        errors.push(v.format(err, {count: maximum}));
       }
 
       if (errors.length > 0) {
-        return options.message || errors;
+        return v.lang("length.message", options.message || this.message) || errors;
       }
     },
-    numericality: function(value, options, attribute, attributes, globalOptions) {
+ numericality: function(value, options, attribute, attributes, globalOptions) { @@ -1498,12 +1488,12 @@

validate.js

, name , count , checks = { - greaterThan: function(v, c) { return v > c; }, - greaterThanOrEqualTo: function(v, c) { return v >= c; }, - equalTo: function(v, c) { return v === c; }, - lessThan: function(v, c) { return v < c; }, - lessThanOrEqualTo: function(v, c) { return v <= c; }, - divisibleBy: function(v, c) { return v % c === 0; } + greaterThan: function(v, c) { return v > c; }, + greaterThanOrEqualTo: function(v, c) { return v >= c; }, + equalTo: function(v, c) { return v === c; }, + lessThan: function(v, c) { return v < c; }, + lessThanOrEqualTo: function(v, c) { return v <= c; }, + divisibleBy: function(v, c) { return v % c === 0; } } , prettify = options.prettify || (globalOptions && globalOptions.prettify) || @@ -1530,11 +1520,10 @@

validate.js

pattern += "$"; if (!(new RegExp(pattern).test(value))) { - return options.message || - options.notValid || - this.notValid || - this.message || - "must be a valid number"; + return v.lang( + "numericality.notValidStrict", + options.notValid || options.message || this.notValid || this.message + ); } } @@ -1569,11 +1558,10 @@

validate.js

      if (!v.isNumber(value)) {
-        return options.message ||
-          options.notValid ||
-          this.notValid ||
-          this.message ||
-          "is not a number";
+        return v.lang(
+          "numericality.notValid",
+          options.notValid || options.message || this.notValid || this.message
+        );
       }
@@ -1591,11 +1579,10 @@

validate.js

      if (options.onlyInteger && !v.isInteger(value)) {
-        return options.message ||
-          options.notInteger ||
-          this.notInteger ||
-          this.message ||
-          "must be an integer";
+        return v.lang(
+          "numericality.notInteger",
+          options.notInteger || options.message || this.notInteger || this.message
+        );
       }
 
       for (name in checks) {
@@ -1618,36 +1605,34 @@ 

validate.js

          var key = "not" + v.capitalize(name);
-          var msg = options[key] ||
-            this[key] ||
-            this.message ||
-            "must be %{type} %{count}";
+          var msg = v.lang(
+            "numericality." + key,
+            options[key] || options.message || this[key] || this.message
+            ) ||
+            v.lang(
+              'numericality.check',
+              options.message || this.message
+            );
 
           errors.push(v.format(msg, {
-            count: count,
-            type: prettify(name)
+            count: count,
+            type: prettify(name)
           }));
         }
       }
 
       if (options.odd && value % 2 !== 1) {
-        errors.push(options.notOdd ||
-            this.notOdd ||
-            this.message ||
-            "must be odd");
+        errors.push(v.lang("numericality.notOdd", options.notOdd || options.message || this.notOdd || this.message));
       }
       if (options.even && value % 2 !== 0) {
-        errors.push(options.notEven ||
-            this.notEven ||
-            this.message ||
-            "must be even");
+        errors.push(v.lang("numericality.notEven", options.notEven || options.message || this.notEven || this.message));
       }
 
       if (errors.length) {
-        return options.message || errors;
+        return v.lang("numericality.message", options.message) || errors;
       }
     },
-    datetime: v.extend(function(value, options) {
+    datetime: v.extend(function(value, options) {
       if (!v.isFunction(this.parse) || !v.isFunction(this.format)) {
         throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");
       }
@@ -1693,33 +1678,24 @@

validate.js

      if (isNaN(value) || options.dateOnly && value % 86400000 !== 0) {
-        err = options.notValid ||
-          options.message ||
-          this.notValid ||
-          "must be a valid date";
-        return v.format(err, {value: arguments[0]});
+        err = v.lang("datetime.notValid", options.notValid || options.message || this.notValid || this.message);
+        return v.format(err, {value: arguments[0]});
       }
 
       if (!isNaN(earliest) && value < earliest) {
-        err = options.tooEarly ||
-          options.message ||
-          this.tooEarly ||
-          "must be no earlier than %{date}";
+        err = v.lang("datetime.tooEarly", options.tooEarly || options.message || this.tooEarly || this.message);
         err = v.format(err, {
-          value: this.format(value, options),
-          date: this.format(earliest, options)
+          value: this.format(value, options),
+          date: this.format(earliest, options)
         });
         errors.push(err);
       }
 
       if (!isNaN(latest) && value > latest) {
-        err = options.tooLate ||
-          options.message ||
-          this.tooLate ||
-          "must be no later than %{date}";
+        err = v.lang("datetime.tooLate", options.tooLate || options.message || this.tooLate || this.message);
         err = v.format(err, {
-          date: this.format(latest, options),
-          value: this.format(value, options)
+          date: this.format(latest, options),
+          value: this.format(value, options)
         });
         errors.push(err);
       }
@@ -1728,21 +1704,21 @@ 

validate.js

return v.unique(errors); } }, { - parse: null, - format: null + parse: null, + format: null }), - date: function(value, options) { - options = v.extend({}, options, {dateOnly: true}); + date: function(value, options) { + options = v.extend({}, options, {dateOnly: true}); return v.validators.datetime.call(v.validators.datetime, value, options); }, - format: function(value, options) { + format: function(value, options) { if (v.isString(options) || (options instanceof RegExp)) { - options = {pattern: options}; + options = {pattern: options}; } options = v.extend({}, this.options, options); - var message = options.message || this.message || "is invalid" + var message = v.lang("format.notValid", options.message || this.message) , pattern = options.pattern , match;
@@ -1774,7 +1750,7 @@

validate.js

return message; } }, - inclusion: function(value, options) { + inclusion: function(value, options) { @@ -1793,18 +1769,16 @@

validate.js

return; } if (v.isArray(options)) { - options = {within: options}; + options = {within: options}; } options = v.extend({}, this.options, options); if (v.contains(options.within, value)) { return; } - var message = options.message || - this.message || - "^%{value} is not included in the list"; - return v.format(message, {value: value}); + var message = v.lang("inclusion.notValid", options.message || this.message); + return v.format(message, {value: value}); }, - exclusion: function(value, options) { + exclusion: function(value, options) { @@ -1823,18 +1797,21 @@

validate.js

return; } if (v.isArray(options)) { - options = {within: options}; + options = {within: options}; } options = v.extend({}, this.options, options); if (!v.contains(options.within, value)) { return; } - var message = options.message || this.message || "^%{value} is restricted"; - return v.format(message, {value: value}); + var message = v.lang("exclusion.notValid", options.notValid || options.message || this.message); + if (v.isString(options.within[value])) { + value = options.within[value]; + } + return v.format(message, {value: value}); }, - email: v.extend(function(value, options) { + email: v.extend(function(value, options) { options = v.extend({}, this.options, options); - var message = options.message || this.message || "is not a valid email"; + var message = v.lang("email.notValid", options.notValid || options.message || this.message); @@ -1859,20 +1836,18 @@

validate.js

return message; } }, { - PATTERN: /^[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i + PATTERN: /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i }), - equality: function(value, options, attribute, attributes, globalOptions) { + equality: function(value, options, attribute, attributes, globalOptions) { if (!v.isDefined(value)) { return; } if (v.isString(options)) { - options = {attribute: options}; + options = {attribute: options}; } options = v.extend({}, this.options, options); - var message = options.message || - this.message || - "is not equal to %{attribute}"; + var message = v.lang("equality.notValid", options.notValid || options.message || this.message); if (v.isEmpty(options.attribute) || !v.isString(options.attribute)) { throw new Error("The attribute must be a non empty string"); @@ -1887,7 +1862,7 @@

validate.js

v.prettify; if (!comparator(value, otherValue, options, attribute, attributes)) { - return v.format(message, {attribute: prettify(options.attribute)}); + return v.format(message, {attribute: prettify(options.attribute)}); } }, @@ -1912,7 +1887,7 @@

validate.js

options = v.extend({}, this.options, options); - var message = options.message || this.message || "is not a valid url" + var message = v.lang("url.notValid", options.notValid || options.message || this.message) , schemes = options.schemes || this.schemes || ['http', 'https'] , allowLocal = options.allowLocal || this.allowLocal || false; @@ -2084,13 +2059,67 @@

validate.js

if (!PATTERN.exec(value)) { return message; } - } + }, + type: v.extend(function(value, originalOptions, attribute, attributes, globalOptions) { + if (v.isString(originalOptions)) { + originalOptions = {type: originalOptions}; + } + + if (!v.isDefined(value)) { + return; + } + + var options = v.extend({}, this.options, originalOptions); + + var type = options.type; + if (!v.isDefined(type)) { + throw new Error("No type was specified"); + } + + var check; + if (v.isFunction(type)) { + check = type; + } else { + check = this.types[type]; + } + + if (!v.isFunction(check)) { + throw new Error("validate.validators.type.types." + type + " must be a function."); + } + + if (!check(value, options, attribute, attributes, globalOptions)) { + var message = originalOptions.message || + this.messages[type] || + this.message || + options.message || + (v.isFunction(type) ? "must be of the correct type" : "must be of type %{type}"); + + if (v.isFunction(message)) { + message = message(value, originalOptions, attribute, attributes, globalOptions); + } + + return v.format(message, {attribute: v.prettify(attribute), type: type}); + } + }, { + types: { + object: function(value) { + return v.isObject(value) && !v.isArray(value); + }, + array: v.isArray, + integer: v.isInteger, + number: v.isNumber, + string: v.isString, + date: v.isDate, + boolean: v.isBoolean + }, + messages: {} + }) }; validate.formatters = { - detailed: function(errors) {return errors;}, - flat: v.flattenErrorsToArray, - grouped: function(errors) { + detailed: function(errors) {return errors;}, + flat: v.flattenErrorsToArray, + grouped: function(errors) { var attr; errors = v.groupErrorsByAttribute(errors); @@ -2099,7 +2128,7 @@

validate.js

} return errors; }, - constraint: function(errors) { + constraint: function(errors) { var attr; errors = v.groupErrorsByAttribute(errors); for (attr in errors) { @@ -2111,6 +2140,81 @@

validate.js

} }; + validate.locales = { + en: { + unknownValidator: "Unknown validator %{name}", + unknownFormat: "Unknown format %{format}", + length: { + notValid: "has an incorrect length", + wrongLength: "is the wrong length (should be %{count} characters)", + tooShort: "is too short (minimum is %{count} characters)", + tooLong: "is too long (maximum is %{count} characters)", + }, + numericality: { + notValidStrict: "must be a valid number", + notValid: "is not a number", + notInteger: "must be an integer", + check: "must be %{type} %{count}", + notOdd: "must be odd", + notEven: "must be even" + }, + datetime: { + notValid: "must be a valid date", + tooEarly: "must be no earlier than %{date}", + tooLate: "must be no later than %{date}" + }, + format: { + notValid: "is invalid" + }, + inclusion: { + notValid: "^%{value} is not included in the list" + }, + exclusion: { + notValid: "^%{value} is restricted" + }, + email: { + notValid: "is not a valid email" + }, + equality: { + notValid: "is not equal to %{attribute}" + }, + url: { + notValid: "is not a valid url" + } + } + }; + + validate.setLocale = function (locale, message) { + if (!message && v.isObject(locale)) { + for (var localeKey in locale) { + if(locale.hasOwnProperty(localeKey)){ + validate.locales[localeKey] = locale[localeKey]; + } + } + return; + } + validate.locales[locale] = message; + }; + + validate.lang = function (langKey, locales, options) { + if (v.isFunction(locales)) { + return locales; + } + if (v.isString(locales)) { + return locales; + } + options = v.extend({}, v.options, options); + if (!options.locale) { + options.locale = "en"; + } + if (v.isObject(locales)) { + return locales[options.locale]; + } + locales = v.extend({}, v.locales.en, v.locales[options.locale]); + + return v.getDeepObjectValue(locales, langKey); + }; + validate.exposeModule(validate, this, exports, module, define); }).call(this, typeof exports !== 'undefined' ? /* istanbul ignore next */ exports : null, diff --git a/validate.min.js b/validate.min.js index ec47e55..02f4f5b 100644 --- a/validate.min.js +++ b/validate.min.js @@ -5,5 +5,5 @@ * validate.js may be freely distributed under the MIT license. */ -(function(a,b,c){"use strict";var d=function(a,b,c){c=e.extend({},e.options,c);var f=e.runValidations(a,b,c);if(f.some(function(a){return e.isPromise(a.error)}))throw new Error("Use validate.async if you want support for promises");return d.processValidationResults(f,c)},e=d;e.extend=function(a){return[].slice.call(arguments,1).forEach(function(b){for(var c in b)a[c]=b[c]}),a},e.extend(d,{version:{major:0,minor:12,patch:0,metadata:null,toString:function(){var a=e.format("%{major}.%{minor}.%{patch}",e.version);return e.isEmpty(e.version.metadata)||(a+="+"+e.version.metadata),a}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(a,b,c){var d,f,g,h,i,j,k,l=[];(e.isDomElement(a)||e.isJqueryElement(a))&&(a=e.collectFormValues(a));for(d in b){g=e.getDeepObjectValue(a,d),h=e.result(b[d],g,a,d,c,b);for(f in h){if(i=e.validators[f],!i)throw k=e.format("Unknown validator %{name}",{name:f}),new Error(k);j=h[f],j=e.result(j,g,a,d,c,b),j&&l.push({attribute:d,value:g,validator:f,globalOptions:c,attributes:a,options:j,error:i.call(i,g,j,d,a,c)})}}return l},processValidationResults:function(a,b){a=e.pruneEmptyErrors(a,b),a=e.expandMultipleErrors(a,b),a=e.convertErrorMessages(a,b);var c=b.format||"grouped";if("function"!=typeof e.formatters[c])throw new Error(e.format("Unknown format %{format}",b));return a=e.formatters[c](a),e.isEmpty(a)?void 0:a},async:function(a,b,c){c=e.extend({},e.async.options,c);var d=c.wrapErrors||function(a){return a};c.cleanAttributes!==!1&&(a=e.cleanAttributes(a,b));var f=e.runValidations(a,b,c);return new e.Promise(function(g,h){e.waitForResults(f).then(function(){var i=e.processValidationResults(f,c);i?h(new d(i,c,a,b)):g(a)},function(a){h(a)})})},single:function(a,b,c){return c=e.extend({},e.single.options,c,{format:"flat",fullMessages:!1}),e({single:a},{single:b},c)},waitForResults:function(a){return a.reduce(function(a,b){return e.isPromise(b.error)?a.then(function(){return b.error.then(function(a){b.error=a||null})}):a},new e.Promise(function(a){a()}))},result:function(a){var b=[].slice.call(arguments,1);return"function"==typeof a&&(a=a.apply(null,b)),a},isNumber:function(a){return"number"==typeof a&&!isNaN(a)},isFunction:function(a){return"function"==typeof a},isInteger:function(a){return e.isNumber(a)&&a%1===0},isBoolean:function(a){return"boolean"==typeof a},isObject:function(a){return a===Object(a)},isDate:function(a){return a instanceof Date},isDefined:function(a){return null!==a&&void 0!==a},isPromise:function(a){return!!a&&e.isFunction(a.then)},isJqueryElement:function(a){return a&&e.isString(a.jquery)},isDomElement:function(a){return a&&a.querySelectorAll&&a.querySelector?e.isObject(document)&&a===document?!0:"object"==typeof HTMLElement?a instanceof HTMLElement:a&&"object"==typeof a&&null!==a&&1===a.nodeType&&"string"==typeof a.nodeName:!1},isEmpty:function(a){var b;if(!e.isDefined(a))return!0;if(e.isFunction(a))return!1;if(e.isString(a))return e.EMPTY_STRING_REGEXP.test(a);if(e.isArray(a))return 0===a.length;if(e.isDate(a))return!1;if(e.isObject(a)){for(b in a)return!1;return!0}return!1},format:e.extend(function(a,b){return e.isString(a)?a.replace(e.format.FORMAT_REGEXP,function(a,c,d){return"%"===c?"%{"+d+"}":String(b[d])}):a},{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(a){return e.isNumber(a)?100*a%1===0?""+a:parseFloat(Math.round(100*a)/100).toFixed(2):e.isArray(a)?a.map(function(a){return e.prettify(a)}).join(", "):e.isObject(a)?a.toString():(a=""+a,a.replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,function(a,b,c){return""+b+" "+c.toLowerCase()}).toLowerCase())},stringifyValue:function(a,b){var c=b&&b.prettify||e.prettify;return c(a)},isString:function(a){return"string"==typeof a},isArray:function(a){return"[object Array]"==={}.toString.call(a)},isHash:function(a){return e.isObject(a)&&!e.isArray(a)&&!e.isFunction(a)},contains:function(a,b){return e.isDefined(a)?e.isArray(a)?-1!==a.indexOf(b):b in a:!1},unique:function(a){return e.isArray(a)?a.filter(function(a,b,c){return c.indexOf(a)==b}):a},forEachKeyInKeypath:function(a,b,c){if(e.isString(b)){var d,f="",g=!1;for(d=0;dk&&(d=b.tooShort||this.tooShort||"is too short (minimum is %{count} characters)",j.push(e.format(d,{count:h}))),e.isNumber(g)&&k>g&&(d=b.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",j.push(e.format(d,{count:g}))),j.length>0?b.message||j:void 0):(e.error(e.format("Attribute %{attr} has a non numeric value for `length`",{attr:c})),b.message||this.notValid||"has an incorrect length")}},numericality:function(a,b,c,d,f){if(e.isDefined(a)){b=e.extend({},this.options,b);var g,h,i=[],j={greaterThan:function(a,b){return a>b},greaterThanOrEqualTo:function(a,b){return a>=b},equalTo:function(a,b){return a===b},lessThan:function(a,b){return b>a},lessThanOrEqualTo:function(a,b){return b>=a},divisibleBy:function(a,b){return a%b===0}},k=b.prettify||f&&f.prettify||e.prettify;if(e.isString(a)&&b.strict){var l="^-?(0|[1-9]\\d*)";if(b.onlyInteger||(l+="(\\.\\d+)?"),l+="$",!new RegExp(l).test(a))return b.message||b.notValid||this.notValid||this.message||"must be a valid number"}if(b.noStrings!==!0&&e.isString(a)&&!e.isEmpty(a)&&(a=+a),!e.isNumber(a))return b.message||b.notValid||this.notValid||this.message||"is not a number";if(b.onlyInteger&&!e.isInteger(a))return b.message||b.notInteger||this.notInteger||this.message||"must be an integer";for(g in j)if(h=b[g],e.isNumber(h)&&!j[g](a,h)){var m="not"+e.capitalize(g),n=b[m]||this[m]||this.message||"must be %{type} %{count}";i.push(e.format(n,{count:h,type:k(g)}))}return b.odd&&a%2!==1&&i.push(b.notOdd||this.notOdd||this.message||"must be odd"),b.even&&a%2!==0&&i.push(b.notEven||this.notEven||this.message||"must be even"),i.length?b.message||i:void 0}},datetime:e.extend(function(a,b){if(!e.isFunction(this.parse)||!e.isFunction(this.format))throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");if(e.isDefined(a)){b=e.extend({},this.options,b);var c,d=[],f=b.earliest?this.parse(b.earliest,b):NaN,g=b.latest?this.parse(b.latest,b):NaN;return a=this.parse(a,b),isNaN(a)||b.dateOnly&&a%864e5!==0?(c=b.notValid||b.message||this.notValid||"must be a valid date",e.format(c,{value:arguments[0]})):(!isNaN(f)&&f>a&&(c=b.tooEarly||b.message||this.tooEarly||"must be no earlier than %{date}",c=e.format(c,{value:this.format(a,b),date:this.format(f,b)}),d.push(c)),!isNaN(g)&&a>g&&(c=b.tooLate||b.message||this.tooLate||"must be no later than %{date}",c=e.format(c,{date:this.format(g,b),value:this.format(a,b)}),d.push(c)),d.length?e.unique(d):void 0)}},{parse:null,format:null}),date:function(a,b){return b=e.extend({},b,{dateOnly:!0}),e.validators.datetime.call(e.validators.datetime,a,b)},format:function(a,b){(e.isString(b)||b instanceof RegExp)&&(b={pattern:b}),b=e.extend({},this.options,b);var c,d=b.message||this.message||"is invalid",f=b.pattern;return e.isDefined(a)?e.isString(a)?(e.isString(f)&&(f=new RegExp(b.pattern,b.flags)),c=f.exec(a),c&&c[0].length==a.length?void 0:d):d:void 0},inclusion:function(a,b){if(e.isDefined(a)&&(e.isArray(b)&&(b={within:b}),b=e.extend({},this.options,b),!e.contains(b.within,a))){var c=b.message||this.message||"^%{value} is not included in the list";return e.format(c,{value:a})}},exclusion:function(a,b){if(e.isDefined(a)&&(e.isArray(b)&&(b={within:b}),b=e.extend({},this.options,b),e.contains(b.within,a))){var c=b.message||this.message||"^%{value} is restricted";return e.format(c,{value:a})}},email:e.extend(function(a,b){b=e.extend({},this.options,b);var c=b.message||this.message||"is not a valid email";if(e.isDefined(a))return e.isString(a)&&this.PATTERN.exec(a)?void 0:c},{PATTERN:/^[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i}),equality:function(a,b,c,d,f){if(e.isDefined(a)){e.isString(b)&&(b={attribute:b}),b=e.extend({},this.options,b);var g=b.message||this.message||"is not equal to %{attribute}";if(e.isEmpty(b.attribute)||!e.isString(b.attribute))throw new Error("The attribute must be a non empty string");var h=e.getDeepObjectValue(d,b.attribute),i=b.comparator||function(a,b){return a===b},j=b.prettify||f&&f.prettify||e.prettify;return i(a,h,b,c,d)?void 0:e.format(g,{attribute:j(b.attribute)})}},url:function(a,b){if(e.isDefined(a)){b=e.extend({},this.options,b);var c=b.message||this.message||"is not a valid url",d=b.schemes||this.schemes||["http","https"],f=b.allowLocal||this.allowLocal||!1;if(!e.isString(a))return c;var g="^(?:(?:"+d.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";f?h+="?":g+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",g+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+h+")(?::\\d{2,5})?(?:[/?#]\\S*)?$";var i=new RegExp(g,"i");return i.exec(a)?void 0:c}}},d.formatters={detailed:function(a){return a},flat:e.flattenErrorsToArray,grouped:function(a){var b;a=e.groupErrorsByAttribute(a);for(b in a)a[b]=e.flattenErrorsToArray(a[b]);return a},constraint:function(a){var b;a=e.groupErrorsByAttribute(a);for(b in a)a[b]=a[b].map(function(a){return a.validator}).sort();return a}},d.exposeModule(d,this,a,b,c)}).call(this,"undefined"!=typeof exports?exports:null,"undefined"!=typeof module?module:null,"undefined"!=typeof define?define:null); +(function(a,b,c){"use strict";var d=function(a,b,c){c=e.extend({},e.options,c);var f=e.runValidations(a,b,c);if(f.some(function(a){return e.isPromise(a.error)}))throw new Error("Use validate.async if you want support for promises");return d.processValidationResults(f,c)},e=d;e.extend=function(a){return[].slice.call(arguments,1).forEach(function(b){for(var c in b)a[c]=b[c]}),a},e.extend(d,{version:{major:0,minor:12,patch:0,metadata:"development",toString:function(){var a=e.format("%{major}.%{minor}.%{patch}",e.version);return e.isEmpty(e.version.metadata)||(a+="+"+e.version.metadata),a}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(a,b,c){var d,f,g,h,i,j,k,l=[];(e.isDomElement(a)||e.isJqueryElement(a))&&(a=e.collectFormValues(a));for(d in b){g=e.getDeepObjectValue(a,d),h=e.result(b[d],g,a,d,c,b);for(f in h){if(i=e.validators[f],!i)throw k=e.format("Unknown validator %{name}",{name:f}),new Error(k);j=h[f],j=e.result(j,g,a,d,c,b),j&&l.push({attribute:d,value:g,validator:f,globalOptions:c,attributes:a,options:j,error:i.call(i,g,j,d,a,c)})}}return l},processValidationResults:function(a,b){a=e.pruneEmptyErrors(a,b),a=e.expandMultipleErrors(a,b),a=e.convertErrorMessages(a,b);var c=b.format||"grouped";if("function"!=typeof e.formatters[c])throw new Error(e.format("Unknown format %{format}",b));return a=e.formatters[c](a),e.isEmpty(a)?void 0:a},async:function(a,b,c){c=e.extend({},e.async.options,c);var d=c.wrapErrors||function(a){return a};c.cleanAttributes!==!1&&(a=e.cleanAttributes(a,b));var f=e.runValidations(a,b,c);return new e.Promise(function(g,h){e.waitForResults(f).then(function(){var i=e.processValidationResults(f,c);i?h(new d(i,c,a,b)):g(a)},function(a){h(a)})})},single:function(a,b,c){return c=e.extend({},e.single.options,c,{format:"flat",fullMessages:!1}),e({single:a},{single:b},c)},waitForResults:function(a){return a.reduce(function(a,b){return e.isPromise(b.error)?a.then(function(){return b.error.then(function(a){b.error=a||null})}):a},new e.Promise(function(a){a()}))},result:function(a){var b=[].slice.call(arguments,1);return"function"==typeof a&&(a=a.apply(null,b)),a},isNumber:function(a){return"number"==typeof a&&!isNaN(a)},isFunction:function(a){return"function"==typeof a},isInteger:function(a){return e.isNumber(a)&&a%1===0},isBoolean:function(a){return"boolean"==typeof a},isObject:function(a){return a===Object(a)},isDate:function(a){return a instanceof Date},isDefined:function(a){return null!==a&&void 0!==a},isPromise:function(a){return!!a&&e.isFunction(a.then)},isJqueryElement:function(a){return a&&e.isString(a.jquery)},isDomElement:function(a){return!!a&&(!(!a.querySelectorAll||!a.querySelector)&&(!(!e.isObject(document)||a!==document)||("object"==typeof HTMLElement?a instanceof HTMLElement:a&&"object"==typeof a&&null!==a&&1===a.nodeType&&"string"==typeof a.nodeName)))},isEmpty:function(a){var b;if(!e.isDefined(a))return!0;if(e.isFunction(a))return!1;if(e.isString(a))return e.EMPTY_STRING_REGEXP.test(a);if(e.isArray(a))return 0===a.length;if(e.isDate(a))return!1;if(e.isObject(a)){for(b in a)return!1;return!0}return!1},format:e.extend(function(a,b){return e.isString(a)?a.replace(e.format.FORMAT_REGEXP,function(a,c,d){return"%"===c?"%{"+d+"}":String(b[d])}):a},{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(a){return e.isNumber(a)?100*a%1===0?""+a:parseFloat(Math.round(100*a)/100).toFixed(2):e.isArray(a)?a.map(function(a){return e.prettify(a)}).join(", "):e.isObject(a)?a.toString():(a=""+a,a.replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,function(a,b,c){return""+b+" "+c.toLowerCase()}).toLowerCase())},stringifyValue:function(a,b){var c=b&&b.prettify||e.prettify;return c(a)},isString:function(a){return"string"==typeof a},isArray:function(a){return"[object Array]"==={}.toString.call(a)},isHash:function(a){return e.isObject(a)&&!e.isArray(a)&&!e.isFunction(a)},contains:function(a,b){return!!e.isDefined(a)&&(e.isArray(a)?a.indexOf(b)!==-1:b in a)},unique:function(a){return e.isArray(a)?a.filter(function(a,b,c){return c.indexOf(a)==b}):a},forEachKeyInKeypath:function(a,b,c){if(e.isString(b)){var d,f="",g=!1;for(d=0;df&&(c=e.lang("length.tooLong",b.tooLong||b.message||this.tooLong||this.message),i.push(e.format(c,{count:f}))),i.length>0?e.lang("length.message",b.message||this.message)||i:void 0):e.lang("length.notValid",b.notValid||b.message||this.notValid||this.message)}},numericality:function(a,b,c,d,f){if(e.isDefined(a)){b=e.extend({},this.options,b);var g,h,i=[],j={greaterThan:function(a,b){return a>b},greaterThanOrEqualTo:function(a,b){return a>=b},equalTo:function(a,b){return a===b},lessThan:function(a,b){return ag&&(c=e.lang("datetime.tooLate",b.tooLate||b.message||this.tooLate||this.message),c=e.format(c,{date:this.format(g,b),value:this.format(a,b)}),d.push(c)),d.length?e.unique(d):void 0)}},{parse:null,format:null}),date:function(a,b){return b=e.extend({},b,{dateOnly:!0}),e.validators.datetime.call(e.validators.datetime,a,b)},format:function(a,b){(e.isString(b)||b instanceof RegExp)&&(b={pattern:b}),b=e.extend({},this.options,b);var c,d=e.lang("format.notValid",b.message||this.message),f=b.pattern;if(e.isDefined(a))return e.isString(a)?(e.isString(f)&&(f=new RegExp(b.pattern,b.flags)),c=f.exec(a),c&&c[0].length==a.length?void 0:d):d},inclusion:function(a,b){if(e.isDefined(a)&&(e.isArray(b)&&(b={within:b}),b=e.extend({},this.options,b),!e.contains(b.within,a))){var c=e.lang("inclusion.notValid",b.message||this.message);return e.format(c,{value:a})}},exclusion:function(a,b){if(e.isDefined(a)&&(e.isArray(b)&&(b={within:b}),b=e.extend({},this.options,b),e.contains(b.within,a))){var c=e.lang("exclusion.notValid",b.notValid||b.message||this.message);return e.isString(b.within[a])&&(a=b.within[a]),e.format(c,{value:a})}},email:e.extend(function(a,b){b=e.extend({},this.options,b);var c=e.lang("email.notValid",b.notValid||b.message||this.message);if(e.isDefined(a))return e.isString(a)&&this.PATTERN.exec(a)?void 0:c},{PATTERN:/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(a,b,c,d,f){if(e.isDefined(a)){e.isString(b)&&(b={attribute:b}),b=e.extend({},this.options,b);var g=e.lang("equality.notValid",b.notValid||b.message||this.message);if(e.isEmpty(b.attribute)||!e.isString(b.attribute))throw new Error("The attribute must be a non empty string");var h=e.getDeepObjectValue(d,b.attribute),i=b.comparator||function(a,b){return a===b},j=b.prettify||f&&f.prettify||e.prettify;return i(a,h,b,c,d)?void 0:e.format(g,{attribute:j(b.attribute)})}},url:function(a,b){if(e.isDefined(a)){b=e.extend({},this.options,b);var c=e.lang("url.notValid",b.notValid||b.message||this.message),d=b.schemes||this.schemes||["http","https"],f=b.allowLocal||this.allowLocal||!1;if(!e.isString(a))return c;var g="^(?:(?:"+d.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";f?h+="?":g+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",g+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+h+")(?::\\d{2,5})?(?:[/?#]\\S*)?$";var i=new RegExp(g,"i");return i.exec(a)?void 0:c}},type:e.extend(function(a,b,c,d,f){if(e.isString(b)&&(b={type:b}),e.isDefined(a)){var g=e.extend({},this.options,b),h=g.type;if(!e.isDefined(h))throw new Error("No type was specified");var i;if(i=e.isFunction(h)?h:this.types[h],!e.isFunction(i))throw new Error("validate.validators.type.types."+h+" must be a function.");if(!i(a,g,c,d,f)){var j=b.message||this.messages[h]||this.message||g.message||(e.isFunction(h)?"must be of the correct type":"must be of type %{type}");return e.isFunction(j)&&(j=j(a,b,c,d,f)),e.format(j,{attribute:e.prettify(c),type:h})}}},{types:{object:function(a){return e.isObject(a)&&!e.isArray(a)},array:e.isArray,integer:e.isInteger,number:e.isNumber,string:e.isString,date:e.isDate,"boolean":e.isBoolean},messages:{}})},d.formatters={detailed:function(a){return a},flat:e.flattenErrorsToArray,grouped:function(a){var b;a=e.groupErrorsByAttribute(a);for(b in a)a[b]=e.flattenErrorsToArray(a[b]);return a},constraint:function(a){var b;a=e.groupErrorsByAttribute(a);for(b in a)a[b]=a[b].map(function(a){return a.validator}).sort();return a}},d.locales={en:{unknownValidator:"Unknown validator %{name}",unknownFormat:"Unknown format %{format}",length:{notValid:"has an incorrect length",wrongLength:"is the wrong length (should be %{count} characters)",tooShort:"is too short (minimum is %{count} characters)",tooLong:"is too long (maximum is %{count} characters)"},numericality:{notValidStrict:"must be a valid number",notValid:"is not a number",notInteger:"must be an integer",check:"must be %{type} %{count}",notOdd:"must be odd",notEven:"must be even"},datetime:{notValid:"must be a valid date",tooEarly:"must be no earlier than %{date}",tooLate:"must be no later than %{date}"},format:{notValid:"is invalid"},inclusion:{notValid:"^%{value} is not included in the list"},exclusion:{notValid:"^%{value} is restricted"},email:{notValid:"is not a valid email"},equality:{notValid:"is not equal to %{attribute}"},url:{notValid:"is not a valid url"}}},d.setLocale=function(a,b){if(b||!e.isObject(a))d.locales[a]=b;else for(var c in a)a.hasOwnProperty(c)&&(d.locales[c]=a[c])},d.lang=function(a,b,c){return e.isFunction(b)?b:e.isString(b)?b:(c=e.extend({},e.options,c),c.locale||(c.locale="en"),e.isObject(b)?b[c.locale]:(b=e.extend({},e.locales.en,e.locales[c.locale]),e.getDeepObjectValue(b,a)))},d.exposeModule(d,this,a,b,c)}).call(this,"undefined"!=typeof exports?exports:null,"undefined"!=typeof module?module:null,"undefined"!=typeof define?define:null); //# sourceMappingURL=validate.min.map \ No newline at end of file diff --git a/validate.min.map b/validate.min.map index 3164378..9e3eb54 100644 --- a/validate.min.map +++ b/validate.min.map @@ -1 +1 @@ -{"version":3,"sources":["validate.js"],"names":["exports","module","define","validate","attributes","constraints","options","v","extend","results","runValidations","some","r","isPromise","error","Error","processValidationResults","obj","slice","call","arguments","forEach","source","attr","version","major","minor","patch","metadata","toString","format","isEmpty","Promise","EMPTY_STRING_REGEXP","validatorName","value","validators","validator","validatorOptions","isDomElement","isJqueryElement","collectFormValues","getDeepObjectValue","result","name","push","attribute","globalOptions","errors","pruneEmptyErrors","expandMultipleErrors","convertErrorMessages","formatters","undefined","async","WrapErrors","wrapErrors","cleanAttributes","resolve","reject","waitForResults","then","err","single","fullMessages","reduce","memo","args","apply","isNumber","isNaN","isFunction","isInteger","isBoolean","isObject","Object","isDate","Date","isDefined","p","o","isString","jquery","querySelectorAll","querySelector","document","HTMLElement","nodeType","nodeName","test","isArray","length","str","vals","replace","FORMAT_REGEXP","m0","m1","m2","String","prettify","parseFloat","Math","round","toFixed","map","s","join","toLowerCase","stringifyValue","isHash","contains","indexOf","unique","array","filter","el","index","forEachKeyInKeypath","object","keypath","callback","i","key","escape","form","j","input","inputs","option","values","item","getAttribute","sanitizeFormValue","type","checked","multiple","selected","_val","selectedIndex","trim","nullify","capitalize","toUpperCase","ret","msg","errorInfo","groupErrorsByAttribute","list","flattenErrorsToArray","self","whitelist","whitelistCreator","last","buildObjectWhitelist","ow","cleanRecursive","w","exposeModule","root","amd","warn","console","presence","this","allowEmpty","message","is","maximum","minimum","tokenizer","val","wrongLength","count","tooShort","tooLong","notValid","numericality","checks","greaterThan","c","greaterThanOrEqualTo","equalTo","lessThan","lessThanOrEqualTo","divisibleBy","strict","pattern","onlyInteger","RegExp","noStrings","notInteger","odd","notOdd","even","notEven","datetime","parse","earliest","NaN","latest","dateOnly","tooEarly","date","tooLate","match","flags","exec","inclusion","within","exclusion","email","PATTERN","equality","otherValue","comparator","v1","v2","url","schemes","allowLocal","regex","tld","detailed","flat","grouped","constraint","sort"],"mappings":";;;;;;;CASA,SAAUA,EAASC,EAAQC,GACzB,YAWA,IAAIC,GAAW,SAASC,EAAYC,EAAaC,GAC/CA,EAAUC,EAAEC,UAAWD,EAAED,QAASA,EAElC,IAAIG,GAAUF,EAAEG,eAAeN,EAAYC,EAAaC,EAIxD,IAAIG,EAAQE,KAAK,SAASC,GAAK,MAAOL,GAAEM,UAAUD,EAAEE,SAClD,KAAM,IAAIC,OAAM,sDAElB,OAAOZ,GAASa,yBAAyBP,EAASH,IAGhDC,EAAIJ,CAMRI,GAAEC,OAAS,SAASS,GAMlB,SALGC,MAAMC,KAAKC,UAAW,GAAGC,QAAQ,SAASC,GAC3C,IAAK,GAAIC,KAAQD,GACfL,EAAIM,GAAQD,EAAOC,KAGhBN,GAGTV,EAAEC,OAAOL,GAGPqB,SACEC,MAAO,EACPC,MAAO,GACPC,MAAO,EACPC,SAAU,KACVC,SAAU,WACR,GAAIL,GAAUjB,EAAEuB,OAAO,6BAA8BvB,EAAEiB,QAIvD,OAHKjB,GAAEwB,QAAQxB,EAAEiB,QAAQI,YACvBJ,GAAW,IAAMjB,EAAEiB,QAAQI,UAEtBJ,IAUXQ,QAA4B,mBAAZA,SAA0BA,QAAqC,KAE/EC,oBAAqB,QAKrBvB,eAAgB,SAASN,EAAYC,EAAaC,GAChD,GACIiB,GACAW,EACAC,EACAC,EACAC,EACAC,EACAxB,EAPAL,MASAF,EAAEgC,aAAanC,IAAeG,EAAEiC,gBAAgBpC,MAClDA,EAAaG,EAAEkC,kBAAkBrC,GAInC,KAAKmB,IAAQlB,GAAa,CACxB8B,EAAQ5B,EAAEmC,mBAAmBtC,EAAYmB,GAMzCa,EAAa7B,EAAEoC,OAAOtC,EAAYkB,GAAOY,EAAO/B,EAAYmB,EAAMjB,EAASD,EAE3E,KAAK6B,IAAiBE,GAAY,CAGhC,GAFAC,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validate.min.js"} \ No newline at end of file +{"version":3,"sources":["validate.js"],"names":["exports","module","define","validate","attributes","constraints","options","v","extend","results","runValidations","some","r","isPromise","error","Error","processValidationResults","obj","slice","call","arguments","forEach","source","attr","version","major","minor","patch","metadata","toString","format","isEmpty","Promise","EMPTY_STRING_REGEXP","validatorName","value","validators","validator","validatorOptions","isDomElement","isJqueryElement","collectFormValues","getDeepObjectValue","result","name","push","attribute","globalOptions","errors","pruneEmptyErrors","expandMultipleErrors","convertErrorMessages","formatters","undefined","async","WrapErrors","wrapErrors","cleanAttributes","resolve","reject","waitForResults","then","err","single","fullMessages","reduce","memo","args","apply","isNumber","isNaN","isFunction","isInteger","isBoolean","isObject","Object","isDate","Date","isDefined","p","o","isString","jquery","querySelectorAll","querySelector","document","HTMLElement","nodeType","nodeName","test","isArray","length","str","vals","replace","FORMAT_REGEXP","m0","m1","m2","String","prettify","parseFloat","Math","round","toFixed","map","s","join","toLowerCase","stringifyValue","isHash","contains","indexOf","unique","array","filter","el","index","forEachKeyInKeypath","object","keypath","callback","i","key","escape","form","j","input","inputs","option","values","item","getAttribute","sanitizeFormValue","type","checked","multiple","selected","_val","selectedIndex","trim","nullify","capitalize","toUpperCase","ret","msg","errorInfo","groupErrorsByAttribute","list","flattenErrorsToArray","self","whitelist","whitelistCreator","last","buildObjectWhitelist","ow","cleanRecursive","w","exposeModule","root","amd","warn","console","presence","this","allowEmpty","message","is","maximum","minimum","tokenizer","val","lang","wrongLength","count","tooShort","tooLong","notValid","numericality","checks","greaterThan","c","greaterThanOrEqualTo","equalTo","lessThan","lessThanOrEqualTo","divisibleBy","strict","pattern","onlyInteger","RegExp","noStrings","notInteger","odd","notOdd","even","notEven","datetime","parse","earliest","NaN","latest","dateOnly","tooEarly","date","tooLate","match","flags","exec","inclusion","within","exclusion","email","PATTERN","equality","otherValue","comparator","v1","v2","url","schemes","allowLocal","regex","tld","originalOptions","check","types","messages","integer","number","string","boolean","detailed","flat","grouped","constraint","sort","locales","en","unknownValidator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