vee-validate
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-beta.6
@@ -23,3 +23,7 @@ export default { | ||
size: (field, [size]) => `${field} يجب ان يكون اقل من ${size} كيلوبايت.`, | ||
url: (field) => `الحقل ${field} يجب ان يكون رابطاً صحيحاً.` | ||
url: (field) => `الحقل ${field} يجب ان يكون رابطاً صحيحاً.`, | ||
date_format: (field, [format]) => `${field} يجب ان يكون على هيئة ${format}.`, | ||
before: (field, [target]) => `${field} يجب ان يكون قبل ${target}.`, | ||
after: (field, [target]) => `${field} يجب ان يكون بعد ${target}.`, | ||
between: (field, [min, max]) => `${field} يجب ان يكون ما بين ${min} و ${max}.` | ||
}; |
@@ -23,3 +23,7 @@ export default { | ||
size: (field, [size]) => `The ${field} must be less than ${size} KB.`, | ||
url: (field) => `The ${field} is not a valid URL.` | ||
url: (field) => `The ${field} is not a valid URL.`, | ||
date_format: (field, [format]) => `The ${field} must be in the format ${format}.`, | ||
before: (field, [target]) => `The ${field} must be before ${target}.`, | ||
after: (field, [target]) => `The ${field} must be after ${target}.`, | ||
between: (field, [min, max]) => `The ${field} must be between ${min} and ${max}.` | ||
}; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VeeValidate=e():t.VeeValidate=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(){function t(){n(this,t),this.errors=[]}return a(t,[{key:"add",value:function(t,e){this.errors.push({field:t,msg:e})}},{key:"all",value:function(){return this.errors.map(function(t){return t.msg})}},{key:"any",value:function(){return!!this.errors.length}},{key:"clear",value:function(){this.errors=[]}},{key:"collect",value:function(t){var e=this;if(!t){var r=function(){var t={};return e.errors.forEach(function(e){t[e.field]||(t[e.field]=[]),t[e.field].push(e.msg)}),{v:t}}();if("object"===("undefined"==typeof r?"undefined":i(r)))return r.v}return this.errors.filter(function(e){return e.field===t}).map(function(t){return t.msg})}},{key:"count",value:function(){return this.errors.length}},{key:"first",value:function(t){for(var e=0;e<this.errors.length;e++)if(this.errors[e].field===t)return this.errors[e].msg;return null}},{key:"has",value:function(t){for(var e=0;e<this.errors.length;e++)if(this.errors[e].field===t)return!0;return!1}},{key:"remove",value:function(t){this.errors=this.errors.filter(function(e){return e.field!==t})}}]),t}();e.a=o},function(t,e,r){"use strict";var n=r(2);r.d(e,"b",function(){return o}),r.d(e,"a",function(){return u});var i=[],a=function(t){for(var e=0;e<i.length;e++)if(i[e].$vm===t)return i[e].$validator},o=function(t){var e=a(t);return e||(e=n.a.create(void 0,t),i.push({$vm:t,$validator:e})),e},u=function(t){for(var e=0;e<i.length;e++)if(i[e].$vm===t)return i.splice(e,1),!0;return!1}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=r(26),a=r(0),o=r(5),u=r(7),c=r(38),f=r(12),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),v="veeValidate",d="en",y=!0,h=function(){function t(e,r){n(this,t),this.locale=d,this.strictMode=y,this.$fields=this._normalize(e),this.errorBag=new a.a,this.$vm=r,"function"==typeof moment&&this.installDateTimeValidators(moment)}return l(t,[{key:"installDateTimeValidators",value:function(e){t.installDateTimeValidators(e)}},{key:"setStrictMode",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.strictMode=t}},{key:"setLocale",value:function(t){u.a[t]||r.i(c.a)("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),this.locale=t}},{key:"attach",value:function(t,e){var r=this,n=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.$fields[t]||(this.$fields[t]={}),this.$fields[t].validations=[],this.errorBag.remove(t),e.split("|").forEach(function(e){r.$fields[t].validations.push(r._normalizeRule(e,r.$fields[t].validations))}),n&&(this.$fields[t].name=n)}},{key:"updateDictionary",value:function(e){t.updateDictionary(e)}},{key:"detach",value:function(t){delete this.$fields[t]}},{key:"extend",value:function(e,r){t.extend(e,r)}},{key:"validateAll",value:function(t){var e=this;if(this.errorBag.clear(),this.$vm&&!t)return void this.$vm.$emit(v);var r=!0,n=null;return Object.keys(t).forEach(function(i){var a=e.validate(i,t[i]);return a instanceof Promise?void(n=a):void(r=r&&a)}),r&&n instanceof Promise?n.then(function(t){return t&&r}):r}},{key:"validate",value:function(t,e){var n=this;if(!this.$fields[t])return!this.strictMode||(r.i(c.a)('You are trying to validate a non-existant field. Use "attach()" first.'),!1);var i=!0,a=null;return this.errorBag.remove(t),this.$fields[t].validations.forEach(function(r){var o=n._test(t,e,r);return o instanceof Promise?void(a=o):void(i=i&&o)}),i&&a instanceof Promise?a.then(function(t){return t&&i}):i}},{key:"_normalize",value:function(t){var e=this;if(!t)return{};var r={};return Object.keys(t).forEach(function(n){t[n].split("|").forEach(function(t){r[n]||(r[n]={validations:[]}),r[n].validations.push(e._normalizeRule(t,r[n].validations))})}),r}},{key:"_normalizeRule",value:function(t,e){var r=[],n=t.split(":")[0];if(~t.indexOf(":")&&(r=t.split(":")[1].split(",")),f.a.installed&&~["after","before","date_between"].indexOf(n)){var i=e.filter(function(t){return"date_format"===t.name})[0];i&&r.push(i.params[0])}return{name:n,params:r}}},{key:"_formatErrorMessage",value:function(t,e){return u.a[this.locale]&&"function"==typeof u.a[this.locale][e.name]?u.a[this.locale][e.name](t,e.params):u.a.en[e.name](t,e.params)}},{key:"_test",value:function(t,e,r){var n=this,a=i.a[r.name],o=a(e,r.params),u=this.$fields[t].name||t;return o instanceof Promise?o.then(function(e){var i=e.reduce(function(t,e){return t&&e.valid},!0);return i||n.errorBag.add(t,n._formatErrorMessage(u,r)),i}):(o||this.errorBag.add(t,this._formatErrorMessage(u,r)),o)}},{key:"getErrors",value:function(){return this.errorBag}}],[{key:"setDefaultLocale",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"en":arguments[0];u.a[t]||r.i(c.a)("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),d=t}},{key:"setStrictMode",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];y=t}},{key:"installDateTimeValidators",value:function(e){if("function"!=typeof e)return r.i(c.a)("To use the date-time validators you must provide moment reference."),!1;if(f.a.installed)return!0;var n=f.a.make(e);return Object.keys(n).forEach(function(e){t.extend(e,n[e])}),t.updateDictionary(f.a.messages),f.a.installed=!0,!0}},{key:"updateDictionary",value:function(t){Object.keys(t).forEach(function(e){u.a[e]||(u.a[e]={}),Object.keys(t[e]).forEach(function(r){u.a[e][r]=t[e][r]})})}},{key:"create",value:function(e,r){return new t(e,r)}},{key:"extend",value:function(e,r){t._guardExtend(e,r),t._merge(e,r)}},{key:"_merge",value:function(t,e){return"function"==typeof e?(i.a[t]=e,void(u.a.en[t]=function(t){return"The "+t+" value is not valid."})):(i.a[t]=e.validate,e.getMessage&&"function"==typeof e.getMessage&&(u.a.en[t]=e.getMessage),void(e.messages&&Object.keys(e.messages).forEach(function(r){u.a[r]||(u.a[r]={}),u.a[r][t]=e.messages[r]})))}},{key:"_guardExtend",value:function(t,e){if(i.a[t])throw new o.a("Extension Error: There is an existing validator with the same name '"+t+"'.");if("function"!=typeof e){if("function"!=typeof e.validate)throw new o.a("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if("function"!=typeof e.getMessage&&"object"!==s(e.messages))throw new o.a("Extension Error: The validator '"+t+"' must have a 'getMessage' method or have a 'messages' object.")}}}]),t}();e.a=h},function(t,e,r){"use strict";var n=r(37),i=[],a="veeValidate",o=function(t,e,r){var n=e.expression,i=r.context;return function(){i.$validator.validate(n||t.name,t.value)}},u=function(t,e,r){var n=e.modifiers,i=e.expression,a=r.context;return function(){!a.$validator.validate(i||t.name,t.files)&&n.reject&&(t.value="")}},c=function(t){var e=t.split("|").filter(function(t){return!!t.match(/confirmed|after|before/)});return!!e.length&&e[0].split(":")[1]},f=function(t,e,r){var n=e.expression,u=e.value,c=r.context,f=void 0;f=n?o(t,{expression:n},{context:c}):function(){return c.$validator.validate(n||t.name,u)},i.push({vm:c,event:"validatorEvent",callback:f,el:t}),c.$on(a,f)};e.a=function(t){return{bind:function(e,a,s){var l=s.context;if(l.$validator.attach(a.expression||e.name,e.dataset.rules,e.dataset.as),f(e,a,{context:l}),a.expression&&!a.modifiers.initial)return void l.$validator.validate(a.expression,a.value);var v="file"===e.type?u(e,a,{context:l}):o(e,{},{context:l}),d=e.dataset.delay||t.delay;v=d?r.i(n.a)(v,d):v;var y="file"===e.type?"change":"input";e.addEventListener(y,v),i.push({vm:l,event:y,callback:v,el:e});var h=c(e.dataset.rules);e.dataset.rules&&h&&l.$once("validatorReady",function(){document.querySelector("input[name='"+h+"']").addEventListener("input",v)})},update:function(t,e,r){var n=e.expression,i=e.value,a=(e.modifiers,e.oldValue),o=r.context;n&&i!==a&&o.$validator.validate(n||t.name,i)},unbind:function(t,e,r){var n=r.context,o=i.filter(function(e){return e.vm===n&&e.el===t});n.$off(a,o.filter(function(t){var e=t.event;return"validatorEvent"===e})[0]),o.filter(function(t){var e=t.event;return"validatorEvent"!==e}).forEach(function(e){t.removeEventListener(e.event,e.callback)})}}}},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(1);e.a=function(t){return{data:function(){return n({},t.errorBagName,this.$validator.errorBag)},mounted:function(){this.$emit("validatorReady")},destroyed:function(){r.i(i.a)(this)}}}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=function(){function t(e){n(this,t),this.msg=e}return i(t,[{key:"toString",value:function(){return this.msg}}]),t}();e.a=a},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a={alpha_dash:function(t){return"The "+t+" may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(t){return"The "+t+" may only contain alpha-numeric characters."},alpha:function(t){return"The "+t+" may only contain alphabetic characters."},between:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be between "+i+" and "+a+"."},confirmed:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" does not match the "+i+"."},decimal:function(t){var e=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],r=n(e,1),i=r[0];return"The "+t+" must be numeric and may contain "+("*"===i?"":i)+" decimal points."},digits:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be numeric and exactly contain "+i+" digits."},dimensions:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be "+i+" pixels by "+a+" pixels."},email:function(t){return"The "+t+" must be a valid email."},ext:function(t){return"The "+t+" must be a valid file."},image:function(t){return"The "+t+" must be an image."},"in":function(t){return"The "+t+" must be a valid value."},ip:function(t){return"The "+t+" must be a valid ip address."},max:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" may not be greater than "+i+" characters."},mimes:function(t){return"The "+t+" must have a valid file type."},min:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be at least "+i+" characters."},not_in:function(t){return"The "+t+" must be a valid value."},numeric:function(t){return"The "+t+" may only contain numeric characters."},regex:function(t){return"The "+t+" format is invalid."},required:function(t){return"The "+t+" is required."},size:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be less than "+i+" KB."},url:function(t){return"The "+t+" is not a valid URL."}}},function(t,e,r){"use strict";var n=r(6);e.a={en:n.a}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,2),a=i[0],o=i[1],u=t(e,o,!0),c=document.querySelector("input[name='"+a+"']");if(!u.isValid()||!c)return!1;var f=t(c.value,o,!0);return!!f.isValid()&&u.isAfter(f)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,2),a=i[0],o=i[1],u=t(e,o,!0),c=document.querySelector("input[name='"+a+"']");if(!u.isValid()||!c)return!1;var f=t(c.value,o,!0);return!!f.isValid()&&u.isBefore(f)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,3),a=i[0],o=i[1],u=i[2],c=t(a,u,!0),f=t(o,u,!0),s=t(e,u,!0);return!!(c.isValid()&&f.isValid()&&s.isValid())&&s.isBetween(c,f)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,1),a=i[0];return t(e,a,!0).isValid()}}},function(t,e,r){"use strict";var n=r(8),i=r(9),a=r(11),o=r(10),u=r(13);e.a={make:function(t){return{date_format:r.i(a.a)(t),after:r.i(n.a)(t),before:r.i(i.a)(t),date_between:r.i(o.a)(t)}},messages:u.a,installed:!1}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a={en:{date_format:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be in the format "+i+"."},before:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be before "+i+"."},after:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be after "+i+"."},between:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be between "+i+" and "+a+"."}}}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z]*$/.test(t)}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z0-9_-]*$/.test(t)}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z0-9]*$/.test(t)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,2),i=r[0],a=r[1];return Number(i)<=t&&Number(a)>=t}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0],a=document.querySelector("input[name='"+i+"']");return!(!a||String(t)!==a.value)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){var e=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],r=n(e,1),i=r[0];if(Array.isArray(t))return!1;if(null===t||void 0===t||""===t)return!0;var a="*"===i?"*":"{0,"+i+"}",o=new RegExp("^[0-9]*.?[0-9]"+a+"$");return!!o.test(t)&&!Number.isNaN(parseFloat(t))}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0],a=String(t);return/^[0-9]*$/.test(a)&&a.length===Number(i)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(t,e,r){var n=window.URL||window.webkitURL;return new Promise(function(i){var a=new Image;a.onerror=function(){return i({name:t.name,valid:!1})},a.onload=function(){var n=a.width===Number(e)&&a.height===Number(r);i({name:t.name,valid:n})},a.src=n.createObjectURL(t)})};e.a=function(t,e){for(var r=n(e,2),a=r[0],o=r[1],u=[],c=0;c<t.length;c++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t[c].name))return!1;u.push(t[c])}return Promise.all(u.map(function(t){return i(t,a,o)}))}},function(t,e,r){"use strict";e.a=function(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(t)}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=new RegExp(".("+e.join("|")+")$","i"),n=0;n<t.length;n++)if(!r.test(t[n].name))return!1;return!0}},function(t,e,r){"use strict";e.a=function(t){for(var e=0;e<t.length;e++)if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t[e].name))return!1;return!0}},function(t,e,r){"use strict";e.a=function(t,e){return!!e.filter(function(e){return e==t}).length}},function(t,e,r){"use strict";var n=r(22),i=r(25),a=r(34),o=r(30),u=r(28),c=r(31),f=r(14),s=r(16),l=r(15),v=r(32),d=r(33),y=r(27),h=r(23),m=r(29),p=r(35),b=r(20),g=r(24),w=r(21),x=r(17),A=r(18),E=r(36),T=r(19);e.a={email:n.a,min:o.a,max:u.a,required:a.a,"in":i.a,not_in:c.a,alpha:f.a,alpha_num:s.a,alpha_dash:l.a,numeric:v.a,regex:d.a,ip:y.a,ext:h.a,mimes:m.a,size:p.a,digits:b.a,image:g.a,dimensions:w.a,between:x.a,confirmed:A.a,url:E.a,decimal:T.a}},function(t,e,r){"use strict";e.a=function(t){return/^(?:(?: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]?)$/.test(t)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];return void 0===t||null===t?i>=0:String(t).length<=i}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=new RegExp(e.join("|").replace("*",".+")+"$","i"),n=0;n<t.length;n++)if(!r.test(t[n].type))return!1;return!0}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];return void 0!==t&&null!==t&&String(t).length>=i}},function(t,e,r){"use strict";e.a=function(t,e){return!e.filter(function(e){return e==t}).length}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[0-9]*$/.test(t)}},function(t,e,r){"use strict";function n(t){return Array.isArray(t)?t:Array.from(t)}e.a=function(t,e){var r=n(e),i=r[0],a=r.slice(1);return new RegExp(i,a).test(String(t))}},function(t,e,r){"use strict";e.a=function(t){return Array.isArray(t)?!!t.length:void 0!==t&&null!==t&&!!String(t).length}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(c){i=!0,a=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];if(isNaN(i))return!1;for(var a=1024*Number(i),o=0;o<t.length;o++)if(t[o].size>a)return!1;return!0}},function(t,e,r){"use strict";e.a=function(t,e){var r=/^https?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\.\(\)%-]*)*\/?$/.test(t),n=e&&e[0];return n&&r?new RegExp("^https?://(([da-z.-]+).)*("+e[0].replace(".","\\$&")+")").test(t):r}},function(t,e,r){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function i(t){return Array.isArray(t)?t:Array.from(t)}e.a=function(t){var e=arguments.length<=1||void 0===arguments[1]?100:arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],a=void 0;return function(o){function u(){r||t.apply(s,f),a=null}var c=i(o),f=c,s=this;a?clearTimeout(a):r&&t.apply.apply(t,[s].concat(n(f))),a=setTimeout(u,e||100)}}},function(t,e,r){"use strict";e.a=function(t){console&&console.warn("vee-validate: "+t)}},function(t,e,r){"use strict";var n=r(2),i=r(1),a=r(4),o=r(3),u=r(0);r.d(e,"install",function(){return c});var c=function(t){var e=arguments.length<=1||void 0===arguments[1]?{locale:"en",delay:0,errorBagName:"errors",messages:null,strict:!0}:arguments[1],u=e.locale,c=e.delay,f=e.errorBagName,s=e.messages,l=e.strict;s&&n.a.updateDictionary(s),n.a.setDefaultLocale(u),n.a.setStrictMode(l);var v={locale:u,delay:c,messages:s,errorBagName:f};Object.defineProperties(t.prototype,{$validator:{get:function(){return r.i(i.b)(this)}}}),t.mixin(r.i(a.a)(v)),t.directive("validate",r.i(o.a)(v))};r.o(n,"a")&&r.d(e,"Validator",function(){return n.a}),r.o(u,"a")&&r.d(e,"ErrorBag",function(){return u.a})}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VeeValidate=e():t.VeeValidate=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(){function t(){n(this,t),this.errors=[]}return a(t,[{key:"add",value:function(t,e){this.errors.push({field:t,msg:e})}},{key:"all",value:function(){return this.errors.map(function(t){return t.msg})}},{key:"any",value:function(){return!!this.errors.length}},{key:"clear",value:function(){this.errors=[]}},{key:"collect",value:function(t){var e=this;if(!t){var r=function(){var t={};return e.errors.forEach(function(e){t[e.field]||(t[e.field]=[]),t[e.field].push(e.msg)}),{v:t}}();if("object"===("undefined"==typeof r?"undefined":i(r)))return r.v}return this.errors.filter(function(e){return e.field===t}).map(function(t){return t.msg})}},{key:"count",value:function(){return this.errors.length}},{key:"first",value:function(t){for(var e=0;e<this.errors.length;e++)if(this.errors[e].field===t)return this.errors[e].msg;return null}},{key:"has",value:function(t){for(var e=0;e<this.errors.length;e++)if(this.errors[e].field===t)return!0;return!1}},{key:"remove",value:function(t){this.errors=this.errors.filter(function(e){return e.field!==t})}}]),t}();e.a=o},function(t,e,r){"use strict";var n=r(2);r.d(e,"b",function(){return o}),r.d(e,"a",function(){return u});var i=[],a=function(t){for(var e=0;e<i.length;e++)if(i[e].$vm===t)return i[e].$validator},o=function(t){var e=a(t);return e||(e=n.a.create(void 0,t),i.push({$vm:t,$validator:e})),e},u=function(t){for(var e=0;e<i.length;e++)if(i[e].$vm===t)return i.splice(e,1),!0;return!1}},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(26),o=r(0),u=r(6),s=r(5),c=r(7),f=r(38),l=r(12),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},d=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),y="veeValidate",h="en",m=!0,p=new s.a({en:{messages:c.a,attributes:{}}}),b=function(){function t(e,r){i(this,t),this.locale=h,this.strictMode=m,this.$fields=this._normalize(e),this.errorBag=new o.a,this.$vm=r,"function"==typeof moment&&this.installDateTimeValidators(moment)}return d(t,[{key:"installDateTimeValidators",value:function(e){t.installDateTimeValidators(e)}},{key:"setStrictMode",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];this.strictMode=t}},{key:"setLocale",value:function(t){p.hasLocale(t)||r.i(f.a)("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),this.locale=t}},{key:"attach",value:function(t,e){var r=this,n=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.$fields[t]||(this.$fields[t]={}),this.$fields[t].validations=[],this.errorBag.remove(t),e.split("|").forEach(function(e){r.$fields[t].validations.push(r._normalizeRule(e,r.$fields[t].validations))}),n&&(this.$fields[t].name=n)}},{key:"updateDictionary",value:function(e){t.updateDictionary(e)}},{key:"detach",value:function(t){delete this.$fields[t]}},{key:"extend",value:function(e,r){t.extend(e,r)}},{key:"validateAll",value:function(t){var e=this;if(this.errorBag.clear(),this.$vm&&!t)return void this.$vm.$emit(y);var r=!0,n=[];return Object.keys(t).forEach(function(i){var a=e.validate(i,t[i]);return"function"==typeof a.then?void n.push(a):void(r=r&&a)}),n.length?Promise.all(n).then(function(t){return t.every(function(t){return t})&&r}):r}},{key:"validate",value:function(t,e){var n=this;if(!this.$fields[t])return!this.strictMode||(r.i(f.a)('Trying to validate a non-existant field: "'+t+'". Use "attach()" first.'),!1);var i=!0,a=[];return this.errorBag.remove(t),this.$fields[t].validations.forEach(function(r){var o=n._test(t,e,r);return"function"==typeof o.then?void a.push(o):void(i=i&&o)}),a.length?Promise.all(a).then(function(t){return t.every(function(t){return t})&&i}):i}},{key:"_normalize",value:function(t){var e=this;if(!t)return{};var r={};return Object.keys(t).forEach(function(n){t[n].split("|").forEach(function(t){r[n]||(r[n]={validations:[]}),r[n].validations.push(e._normalizeRule(t,r[n].validations))})}),r}},{key:"_normalizeRule",value:function(t,e){var r=[],n=t.split(":")[0];if(~t.indexOf(":")&&(r=t.split(":")[1].split(",")),l.a.installed&&~["after","before","date_between"].indexOf(n)){var i=e.filter(function(t){return"date_format"===t.name})[0];i&&r.push(i.params[0])}return{name:n,params:r}}},{key:"_formatErrorMessage",value:function(t,e){return p.hasLocale(this.locale)&&"function"==typeof p.getMessage(this.locale,e.name)?p.getMessage(this.locale,e.name)(t,e.params):p.getMessage("en",e.name)(t,e.params)}},{key:"_getFieldDisplayName",value:function(t){return this.$fields[t].name||p.getAttribute(this.locale,t,t)}},{key:"_test",value:function(t,e,r){var n=this,i=a.a[r.name],o=i(e,r.params),u=this._getFieldDisplayName(t);return"function"==typeof o.then?o.then(function(e){var i=Array.isArray(e)?e.every(function(t){return t.valid}):e.valid;return i||n.errorBag.add(t,n._formatErrorMessage(u,r)),i}):(o||this.errorBag.add(t,this._formatErrorMessage(u,r)),o)}},{key:"getErrors",value:function(){return this.errorBag}}],[{key:"setDefaultLocale",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"en":arguments[0];p.hasLocale(t)||r.i(f.a)("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),h=t}},{key:"setStrictMode",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];m=t}},{key:"installDateTimeValidators",value:function(e){if("function"!=typeof e)return r.i(f.a)("To use the date-time validators you must provide moment reference."),!1;if(l.a.installed)return!0;var n=l.a.make(e);return Object.keys(n).forEach(function(e){t.extend(e,n[e])}),t.updateDictionary({en:{messages:l.a.messages}}),l.a.installed=!0,!0}},{key:"updateDictionary",value:function(t){p.merge(t)}},{key:"create",value:function(e,r){return new t(e,r)}},{key:"extend",value:function(e,r){t._guardExtend(e,r),t._merge(e,r)}},{key:"_merge",value:function(t,e){return"function"==typeof e?(a.a[t]=e,void p.setMessage("en",t,function(t){return"The "+t+" value is not valid."})):(a.a[t]=e.validate,e.getMessage&&"function"==typeof e.getMessage&&p.setMessage("en",t,e.getMessage),void(e.messages&&p.merge(Object.keys(e.messages).reduce(function(r,i){var a=r;return a[i]={messages:n({},t,e.messages[i])},a},{}))))}},{key:"_guardExtend",value:function(t,e){if(a.a[t])throw new u.a("Extension Error: There is an existing validator with the same name '"+t+"'.");if("function"!=typeof e){if("function"!=typeof e.validate)throw new u.a("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if("function"!=typeof e.getMessage&&"object"!==v(e.messages))throw new u.a("Extension Error: The validator '"+t+"' must have a 'getMessage' method or have a 'messages' object.")}}}]),t}();e.a=b},function(t,e,r){"use strict";var n=r(37),i=[],a="veeValidate",o=function(t,e,r){var n=e.expression,i=r.context;return function(){i.$validator.validate(n||t.name,t.value)}},u=function(t,e,r){var n=e.modifiers,i=e.expression,a=r.context;return function(){!a.$validator.validate(i||t.name,t.files)&&n.reject&&(t.value="")}},s=function(t){var e=t.split("|").filter(function(t){return!!t.match(/confirmed|after|before/)});return!!e.length&&e[0].split(":")[1]},c=function(t,e,r){var n=e.expression,u=e.value,s=r.context,c=void 0;c=n?o(t,{expression:n},{context:s}):function(){return s.$validator.validate(n||t.name,u)},i.push({vm:s,event:"validatorEvent",callback:c,el:t}),s.$on(a,c)};e.a=function(t){return{bind:function(e,a,f){var l=f.context;if(l.$validator.attach(a.expression||e.name,e.dataset.rules,e.dataset.as),c(e,a,{context:l}),a.expression&&!a.modifiers.initial)return void l.$validator.validate(a.expression,a.value);var v="file"===e.type?u(e,a,{context:l}):o(e,a,{context:l}),d=e.dataset.delay||t.delay;v=d?r.i(n.a)(v,d):v;var y="file"===e.type?"change":"input";e.addEventListener(y,v),i.push({vm:l,event:y,callback:v,el:e});var h=s(e.dataset.rules);e.dataset.rules&&h&&l.$once("validatorReady",function(){document.querySelector("input[name='"+h+"']").addEventListener("input",v)})},update:function(t,e,r){var n=e.expression,i=e.value,a=(e.modifiers,e.oldValue),o=r.context;n&&i!==a&&o.$validator.validate(n||t.name,i)},unbind:function(t,e,r){var n=r.context,o=i.filter(function(e){return e.vm===n&&e.el===t});n.$off(a,o.filter(function(t){var e=t.event;return"validatorEvent"===e})[0]),o.filter(function(t){var e=t.event;return"validatorEvent"!==e}).forEach(function(e){t.removeEventListener(e.event,e.callback)})}}}},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(1);e.a=function(t){return{data:function(){return n({},t.errorBagName,this.$validator.errorBag)},mounted:function(){this.$emit("validatorReady")},destroyed:function(){r.i(i.a)(this)}}}},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,t),this.dictionary={},this.merge(e)}return o(t,[{key:"hasLocale",value:function(t){return!!this.dictionary[t]}},{key:"getMessage",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];return this.hasMessage(t,e)?this.dictionary[t].messages[e]:r}},{key:"getAttribute",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];return this.hasAttribute(t,e)?this.dictionary[t].attributes[e]:r}},{key:"hasMessage",value:function(t,e){return!!(this.hasLocale(t)&&this.dictionary[t].messages&&this.dictionary[t].messages[e])}},{key:"hasAttribute",value:function(t,e){return!!(this.hasLocale(t)&&this.dictionary[t].attributes&&this.dictionary[t].attributes[e])}},{key:"merge",value:function(t){this._merge(this.dictionary,t)}},{key:"setMessage",value:function(t,e,r){this.hasLocale(t)||(this.dictionary[t]={messages:{},attributes:{}}),this.dictionary[t].messages[e]=r}},{key:"setAttribute",value:function(t,e,r){this.hasLocale(t)||(this.dictionary[t]={messages:{},attributes:{}}),this.dictionary[t].attributes[e]=r}},{key:"_isObject",value:function(t){return t&&"object"===("undefined"==typeof t?"undefined":a(t))&&!Array.isArray(t)&&null!==t}},{key:"_merge",value:function(t,e){var r=this;return this._isObject(t)&&this._isObject(e)?(Object.keys(e).forEach(function(i){return r._isObject(e[i])?(t[i]||Object.assign(t,n({},i,{})),void r._merge(t[i],e[i])):void Object.assign(t,n({},i,e[i]))}),t):t}}]),t}();e.a=u},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=function(){function t(e){n(this,t),this.msg=e}return i(t,[{key:"toString",value:function(){return this.msg}}]),t}();e.a=a},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a={alpha_dash:function(t){return"The "+t+" may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(t){return"The "+t+" may only contain alpha-numeric characters."},alpha:function(t){return"The "+t+" may only contain alphabetic characters."},between:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be between "+i+" and "+a+"."},confirmed:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" does not match the "+i+"."},decimal:function(t){var e=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],r=n(e,1),i=r[0];return"The "+t+" must be numeric and may contain "+("*"===i?"":i)+" decimal points."},digits:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be numeric and exactly contain "+i+" digits."},dimensions:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be "+i+" pixels by "+a+" pixels."},email:function(t){return"The "+t+" must be a valid email."},ext:function(t){return"The "+t+" must be a valid file."},image:function(t){return"The "+t+" must be an image."},"in":function(t){return"The "+t+" must be a valid value."},ip:function(t){return"The "+t+" must be a valid ip address."},max:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" may not be greater than "+i+" characters."},mimes:function(t){return"The "+t+" must have a valid file type."},min:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be at least "+i+" characters."},not_in:function(t){return"The "+t+" must be a valid value."},numeric:function(t){return"The "+t+" may only contain numeric characters."},regex:function(t){return"The "+t+" format is invalid."},required:function(t){return"The "+t+" is required."},size:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be less than "+i+" KB."},url:function(t){return"The "+t+" is not a valid URL."}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,2),a=i[0],o=i[1],u=t(e,o,!0),s=document.querySelector("input[name='"+a+"']");if(!u.isValid()||!s)return!1;var c=t(s.value,o,!0);return!!c.isValid()&&u.isAfter(c)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,2),a=i[0],o=i[1],u=t(e,o,!0),s=document.querySelector("input[name='"+a+"']");if(!u.isValid()||!s)return!1;var c=t(s.value,o,!0);return!!c.isValid()&&u.isBefore(c)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,3),a=i[0],o=i[1],u=i[2],s=t(a,u,!0),c=t(o,u,!0),f=t(e,u,!0);return!!(s.isValid()&&c.isValid()&&f.isValid())&&f.isBetween(s,c)}}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){return function(e,r){var i=n(r,1),a=i[0];return t(e,a,!0).isValid()}}},function(t,e,r){"use strict";var n=r(8),i=r(9),a=r(11),o=r(10),u=r(13);e.a={make:function(t){return{date_format:r.i(a.a)(t),after:r.i(n.a)(t),before:r.i(i.a)(t),date_between:r.i(o.a)(t)}},messages:u.a,installed:!1}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a={date_format:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be in the format "+i+"."},before:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be before "+i+"."},after:function(t,e){var r=n(e,1),i=r[0];return"The "+t+" must be after "+i+"."},between:function(t,e){var r=n(e,2),i=r[0],a=r[1];return"The "+t+" must be between "+i+" and "+a+"."}}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z]*$/.test(t)}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z0-9_-]*$/.test(t)}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[a-zA-Z0-9]*$/.test(t)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,2),i=r[0],a=r[1];return Number(i)<=t&&Number(a)>=t}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0],a=document.querySelector("input[name='"+i+"']");return!(!a||String(t)!==a.value)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t){var e=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],r=n(e,1),i=r[0];if(Array.isArray(t))return!1;if(null===t||void 0===t||""===t)return!0;var a="*"===i?"*":"{0,"+i+"}",o=new RegExp("^[0-9]*.?[0-9]"+a+"$");return!!o.test(t)&&!Number.isNaN(parseFloat(t))}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0],a=String(t);return/^[0-9]*$/.test(a)&&a.length===Number(i)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(t,e,r){var n=window.URL||window.webkitURL;return new Promise(function(i){var a=new Image;a.onerror=function(){return i({valid:!1})},a.onload=function(){return i({valid:a.width===Number(e)&&a.height===Number(r)})},a.src=n.createObjectURL(t)})};e.a=function(t,e){for(var r=n(e,2),a=r[0],o=r[1],u=[],s=0;s<t.length;s++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t[s].name))return!1;u.push(t[s])}return Promise.all(u.map(function(t){return i(t,a,o)}))}},function(t,e,r){"use strict";e.a=function(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(t)}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=new RegExp(".("+e.join("|")+")$","i"),n=0;n<t.length;n++)if(!r.test(t[n].name))return!1;return!0}},function(t,e,r){"use strict";e.a=function(t){for(var e=0;e<t.length;e++)if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t[e].name))return!1;return!0}},function(t,e,r){"use strict";e.a=function(t,e){return!!e.filter(function(e){return e==t}).length}},function(t,e,r){"use strict";var n=r(22),i=r(25),a=r(34),o=r(30),u=r(28),s=r(31),c=r(14),f=r(16),l=r(15),v=r(32),d=r(33),y=r(27),h=r(23),m=r(29),p=r(35),b=r(20),g=r(24),w=r(21),x=r(17),A=r(18),k=r(36),T=r(19);e.a={email:n.a,min:o.a,max:u.a,required:a.a,"in":i.a,not_in:s.a,alpha:c.a,alpha_num:f.a,alpha_dash:l.a,numeric:v.a,regex:d.a,ip:y.a,ext:h.a,mimes:m.a,size:p.a,digits:b.a,image:g.a,dimensions:w.a,between:x.a,confirmed:A.a,url:k.a,decimal:T.a}},function(t,e,r){"use strict";e.a=function(t){return/^(?:(?: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]?)$/.test(t)}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];return void 0===t||null===t?i>=0:String(t).length<=i}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=new RegExp(e.join("|").replace("*",".+")+"$","i"),n=0;n<t.length;n++)if(!r.test(t[n].type))return!1;return!0}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];return void 0!==t&&null!==t&&String(t).length>=i}},function(t,e,r){"use strict";e.a=function(t,e){return!e.filter(function(e){return e==t}).length}},function(t,e,r){"use strict";e.a=function(t){return!Array.isArray(t)&&/^[0-9]*$/.test(t)}},function(t,e,r){"use strict";function n(t){return Array.isArray(t)?t:Array.from(t)}e.a=function(t,e){var r=n(e),i=r[0],a=r.slice(1);return new RegExp(i,a).test(String(t))}},function(t,e,r){"use strict";e.a=function(t){return Array.isArray(t)?!!t.length:void 0!==t&&null!==t&&!!String(t).length}},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(s){i=!0,a=s}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.a=function(t,e){var r=n(e,1),i=r[0];if(isNaN(i))return!1;for(var a=1024*Number(i),o=0;o<t.length;o++)if(t[o].size>a)return!1;return!0}},function(t,e,r){"use strict";e.a=function(t,e){var r=/^https?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\.\(\)%-]*)*\/?$/.test(t),n=e&&e[0];return n&&r?new RegExp("^https?://(([da-z.-]+).)*("+e[0].replace(".","\\$&")+")").test(t):r}},function(t,e,r){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function i(t){return Array.isArray(t)?t:Array.from(t)}e.a=function(t){var e=arguments.length<=1||void 0===arguments[1]?100:arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],a=void 0;return function(o){function u(){r||t.apply(f,c),a=null}var s=i(o),c=s,f=this;a?clearTimeout(a):r&&t.apply.apply(t,[f].concat(n(c))),a=setTimeout(u,e||100)}}},function(t,e,r){"use strict";e.a=function(t){console&&console.warn("vee-validate: "+t)}},function(t,e,r){"use strict";var n=r(2),i=r(1),a=r(4),o=r(3),u=r(0);r.d(e,"install",function(){return s});var s=function(t,e){var u=e.locale,s=void 0===u?"en":u,c=e.delay,f=void 0===c?0:c,l=e.errorBagName,v=void 0===l?"errors":l,d=e.dictionary,y=void 0===d?null:d,h=e.strict,m=void 0===h||h;y&&n.a.updateDictionary(y),n.a.setDefaultLocale(s),n.a.setStrictMode(m);var p={locale:s,delay:f,dictionary:y,errorBagName:v};Object.defineProperties(t.prototype,{$validator:{get:function(){return r.i(i.b)(this)}}}),t.mixin(r.i(a.a)(p)),t.directive("validate",r.i(o.a)(p))};r.o(n,"a")&&r.d(e,"Validator",function(){return n.a}),r.o(u,"a")&&r.d(e,"ErrorBag",function(){return u.a})}])}); |
{ | ||
"name": "vee-validate", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-beta.6", | ||
"description": "Simple VueJS input validation plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/vee-validate.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113012
1697