Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vee-validate - npm Package Compare versions

Comparing version 1.0.0-beta.6 to 1.0.0-beta.7

dist/locale/de.js

10

dist/locale/ar.js
export default {
after: (field, [target]) => `${field} يجب ان يكون بعد ${target}.`,
alpha_dash: (field) => `${field} قد يحتوي على حروف او الرموز - و _.`,
alpha_num: (field) => `${field} قد يحتوي فقط على حروف وارقام.`,
alpha: (field) => `${field} يجب ان يحتوي على حروف فقط.`,
before: (field, [target]) => `${field} يجب ان يكون قبل ${target}.`,
between: (field, [min, max]) => `قيمة ${field} يجب ان تكون ما بين ${min} و ${max}.`,
confirmed: (field, [confirmedField]) => `${field} لا يماثل التأكيد.`,
date_between: (field, [min, max]) => `${field} يجب ان يكون ما بين ${min} و ${max}.`,
date_format: (field, [format]) => `${field} يجب ان يكون على هيئة ${format}.`,
decimal: (field, [decimals] = ['*']) => `${field} يجب ان يكون قيمة رقمية وقد يحتوي على ${decimals === '*' ? '' : decimals} ارقام عشرية.`,

@@ -23,7 +27,3 @@ digits: (field, [length]) => `${field} يجب ان تحتوي فقط على ارقام والا يزيد عددها عن ${length} رقم.`,

size: (field, [size]) => `${field} يجب ان يكون اقل من ${size} كيلوبايت.`,
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}.`
url: (field) => `الحقل ${field} يجب ان يكون رابطاً صحيحاً.`
};
export default {
after: (field, [target]) => `The ${field} must be after ${target}.`,
alpha_dash: (field) => `The ${field} may contain alpha-numeric characters as well as dashes and underscores.`,
alpha_num: (field) => `The ${field} may only contain alpha-numeric characters.`,
alpha: (field) => `The ${field} may only contain alphabetic characters.`,
before: (field, [target]) => `The ${field} must be before ${target}.`,
between: (field, [min, max]) => `The ${field} must be between ${min} and ${max}.`,
confirmed: (field, [confirmedField]) => `The ${field} does not match the ${confirmedField}.`,
date_between: (field, [min, max]) => `The ${field} must be between ${min} and ${max}.`,
date_format: (field, [format]) => `The ${field} must be in the format ${format}.`,
decimal: (field, [decimals] = ['*']) => `The ${field} must be numeric and may contain ${decimals === '*' ? '' : decimals} decimal points.`,

@@ -23,7 +27,3 @@ digits: (field, [length]) => `The ${field} must be numeric and exactly contain ${length} digits.`,

size: (field, [size]) => `The ${field} must be less than ${size} KB.`,
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}.`
url: (field) => `The ${field} is not a valid URL.`
};

@@ -9,2 +9,3 @@ export default {

confirmed: (field, [confirmedField]) => `El campo ${field} no coincide con ${confirmedField}.`,
date_between: (field, [min, max]) => `El campo ${field} debe estar entre ${min} y ${max}.`,
date_format: (field, [format]) => `El campo ${field} debe tener formato formato ${format}.`,

@@ -27,3 +28,3 @@ decimal: (field, [decimals] = ['*']) => `El campo ${field} debe ser númerico y contener ${decimals === '*' ? '' : decimals} puntos decimales.`,

size: (field, [size]) => `El campo ${field} debe ser menor a ${size} KB.`,
url: (field) => `El campo ${field} no es una URL válida.`,
url: (field) => `El campo ${field} no es una URL válida.`
};
export default {
after: (field, [target]) => `${field} tulee olla jälkeen ${target}.`,
alpha_dash: (field) => `${field} voi sisältää vain kirajimia, numeroita, ja tavu-, tai alaviivoja.`,
alpha_num: (field) => `${field} voi sisältää vain kirjaimia ja numeroita.`,
alpha: (field) => `${field} voi sisältää vain kirjaimia.`,
before: (field, [target]) => `${field} tulee olla ennen ${target}.`,
between: (field, [min, max]) => `Kentän ${field} tulee olla ${min} ja ${max} väliltä.`,
confirmed: (field, [confirmedField]) => `${field} ei vastannut ${confirmedField}.`,
date_between: (field, [min, max]) => `${field} tulee olla ${min} ja ${max} väliltä.`,
date_format: (field, [format]) => `${field} tulee olla muodossa ${format}.`,
decimal: (field, [decimals] = ['*']) => `${field} tulee olla numeerinen ja voi sisältää ${decimals === '*' ? '' : decimals} desimaalia.`,

@@ -23,7 +27,3 @@ digits: (field, [length]) => `${field} tulee olla numeerinen ja tarkalleen ${length} merkkiä.`,

size: (field, [size]) => `${field} tulee olla vähemmän kuin ${size} KB.`,
url: (field) => `${field} tulee olla kelvollinen URL-osoite.`,
date_format: (field, [format]) => `${field} tulee olla muodossa ${format}.`,
before: (field, [target]) => `${field} tulee olla ennen ${target}.`,
after: (field, [target]) => `${field} tulee olla jälkeen ${target}.`,
between: (field, [min, max]) => `${field} tulee olla ${min} ja ${max} väliltä.`
};
url: (field) => `${field} tulee olla kelvollinen URL-osoite.`
};
export default {
after: (field, [target]) => `O campo ${field} deve estar depois do campo ${target}.`,
alpha_dash: (field) => `O campo ${field} deve conter letras, números e traços.`,
alpha_num: (field) => `O campo ${field} deve conter somente letras e números.`,
alpha: (field) => `O campo ${field} deve conter somente letras.`,
before: (field, [target]) => `O campo ${field} deve estar antes do campo ${target}.`,
between: (field, [min, max]) => `O campo ${field} deve estar entre ${min} e ${max}.`,
confirmed: (field, [confirmedField]) => `O campo ${field} e ${confirmedField} devem ser iguais.`,
date_between: (field, [min, max]) => `O campo ${field} deve estar entre ${min} e ${max}.`,
date_format: (field, [format]) => `O campo ${field} deve estar no formato ${format}.`,
decimal: (field, [decimals] = ['*']) => `O campo ${field} deve ser numérico e deve conter ${decimals === '*' ? '' : decimals} casas decimais.`,

@@ -23,7 +27,3 @@ digits: (field, [length]) => `O campo ${field} deve ser numérico e ter ${length} dígitos.`,

size: (field, [size]) => `O campo ${field} deve ser menor que ${size} KB.`,
url: (field) => `O campo ${field} não é uma URL válida.`,
date_format: (field, [format]) => `O campo ${field} deve estar no formato ${format}.`,
before: (field, [target]) => `O campo ${field} deve estar antes do campo ${target}.`,
after: (field, [target]) => `O campo ${field} deve estar depois do campo ${target}.`,
between: (field, [min, max]) => `O campo ${field} deve estar entre ${min} e ${max}.`
url: (field) => `O campo ${field} não é uma URL válida.`
};

@@ -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,r){var n={field:t,msg:e};r&&(n.scope=r),this.errors.push(n)}},{key:"all",value:function(t){return t?this.errors.filter(function(e){return e.scope===t}).map(function(t){return t.msg}):this.errors.map(function(t){return t.msg})}},{key:"any",value:function(t){return t?!!this.errors.filter(function(e){return e.scope===t}).length:!!this.errors.length}},{key:"clear",value:function(t){return t?void(this.errors=this.errors.filter(function(e){return e.scope!==t})):void(this.errors=[])}},{key:"collect",value:function(t,e){var r=this;if(!t){var n=function(){var t={};return r.errors.forEach(function(e){t[e.field]||(t[e.field]=[]),t[e.field].push(e.msg)}),{v:t}}();if("object"===("undefined"==typeof n?"undefined":i(n)))return n.v}return e?this.errors.filter(function(r){return r.field===t&&r.scope===e}).map(function(t){return t.msg}):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,e){for(var r=0;r<this.errors.length;r++)if(this.errors[r].field===t){if(!e)return this.errors[r].msg;if(this.errors[r].scope===e)return this.errors[r].msg}return null}},{key:"has",value:function(t,e){for(var r=0;r<this.errors.length;r++)if(this.errors[r].field===t){if(!e)return!0;if(this.errors[r].scope===e)return!0}return!1}},{key:"remove",value:function(t,e){return e?void(this.errors=this.errors.filter(function(r){return r.field!==t||r.scope!==e})):void(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),l=r(38),f=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}}(),h="veeValidate",y="en",m=!0,p=new s.a({en:{messages:c.a,attributes:{}}}),b=function(){function t(e,r){i(this,t),this.locale=y,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(l.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){var n=r._normalizeRule(e,r.$fields[t].validations);"required"===n.name&&(r.$fields[t].required=!0),r.$fields[t].validations.push(n)}),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.$vm&&(!t||"string"==typeof t))return this.errorBag.clear(t),void this.$vm.$emit(h,t);var r=!0,n=[];return this.errorBag.clear(),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,n){var i=this;if(!this.$fields[t])return!this.strictMode||(r.i(l.a)('Trying to validate a non-existant field: "'+t+'". Use "attach()" first.'),!1);if(this.errorBag.remove(t,n),!this.$fields[t].required&&~[null,void 0,""].indexOf(e))return!0;var a=!0,o=[];return this.$fields[t].validations.forEach(function(r){var u=i._test(t,e,r,n);return"function"==typeof u.then?void o.push(u):void(a=a&&u)}),o.length?Promise.all(o).then(function(t){return t.every(function(t){return t})&&a}):a}},{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:[]});var i=e._normalizeRule(t,r[n].validations);"required"===i.name&&(r[n].required=!0),r[n].validations.push(i)})}),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 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,n){var i=this,o=a.a[r.name],u=o(e,r.params),s=this._getFieldDisplayName(t);return"function"==typeof u.then?u.then(function(e){var a=Array.isArray(e)?e.every(function(t){return t.valid}):e.valid;return a||i.errorBag.add(t,i._formatErrorMessage(s,r),n),a}):(u||this.errorBag.add(t,this._formatErrorMessage(s,r),n),u)}},{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(l.a)("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),y=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(l.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({en:{messages:f.a.messages}}),f.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="veeValidate",a=function(t){return t.dataset.scope||t.form&&t.form.dataset.scope||void 0},o=function(t){var e=t.split("|").filter(function(t){return!!t.match(/confirmed|after|before/)});return!!e.length&&e[0].split(":")[1]};e.a=function(t){return{onInput:function(){this.vm.$validator.validate(this.fieldName,this.el.value,a(this.el))},onFileInput:function(){!this.vm.$validator.validate(this.fieldName,this.el.files,a(this.el))&&this.modifiers.reject&&(this.el.value="")},attachValidatorEvent:function(){var t=this,e=a(this.el),r=e?function(r){r===e&&t.vm.$validator.validate(t.fieldName,t.el.value,e)}:function(){t.vm.$validator.validate(t.fieldName,t.el.value,e)};this.validatorCallback=r,this.vm.$on(i,this.validatorCallback);var n=o(this.el.dataset.rules);this.el.dataset.rules&&n&&this.vm.$once("validatorReady",function(){document.querySelector("input[name='"+n+"']").addEventListener("input",function(){t.vm.$validator.validate(t.fieldName,t.el.value,e)})})},bind:function(){var e=this;this.vm.$nextTick(function(){if(e.fieldName=e.expression||e.el.name,e.vm.$validator.attach(e.fieldName,e.el.dataset.rules,e.el.dataset.as),e.expression)return void e.attachValidatorEvent();var i="file"===e.el.type?e.onFileInput:e.onInput;e.handles="file"===e.el.type?"change":"input";var a=e.el.dataset.delay||t.delay;e.handler=a?r.i(n.a)(i.bind(e),a):i.bind(e),e.el.addEventListener(e.handles,e.handler),e.attachValidatorEvent()})},update:function(t){var e=this;if(this.expression)return this.modifiers.initial?void(this.modifiers.initial=!1):this.fieldName?void this.vm.$validator.validate(this.fieldName,t):void this.vm.$nextTick(function(){e.vm.$validator.validate(e.fieldName,t)})},unbind:function(){this.handler&&this.el.removeEventListener(this.handles,this.handler),this.vm.$validator.detach(this.fieldName),this.vm.$off(i,this.validatorCallback)}}}},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)},ready:function(){var t=this;this.$nextTick(function(){t.$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),l=t(e,u,!0);return!!(s.isValid()&&c.isValid()&&l.isValid())&&l.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),l=r(16),f=r(15),v=r(32),d=r(33),h=r(27),y=r(23),m=r(29),p=r(35),b=r(20),g=r(24),w=r(21),A=r(17),k=r(18),T=r(36),x=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:l.a,alpha_dash:f.a,numeric:v.a,regex:d.a,ip:h.a,ext:y.a,mimes:m.a,size:p.a,digits:b.a,image:g.a,dimensions:w.a,between:A.a,confirmed:k.a,url:T.a,decimal:x.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(l,c),a=null}var s=i(o),c=s,l=this;a?clearTimeout(a):r&&t.apply.apply(t,[l].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){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e.locale,s=void 0===u?"en":u,c=e.delay,l=void 0===c?0:c,f=e.errorBagName,v=void 0===f?"errors":f,d=e.dictionary,h=void 0===d?null:d,y=e.strict,m=void 0===y||y;h&&n.a.updateDictionary(h),n.a.setDefaultLocale(s),n.a.setStrictMode(m);var p={locale:s,delay:l,dictionary:h,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.d(e,"Validator",function(){return n.a}),r.d(e,"ErrorBag",function(){return u.a})}])});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";var e=function(e){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(e)},t=function(e,t){return!!t.filter(function(t){return t==e}).length},n=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!!String(e).length},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&o["return"]&&o["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(e){return Array.isArray(e)?e:Array.from(e)},l=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},c=function(e,t){var n=o(t,1),r=n[0];return void 0!==e&&null!==e&&String(e).length>=r},f=function(e,t){var n=o(t,1),r=n[0];return void 0===e||null===e?r>=0:String(e).length<=r},h=function(e,t){return!t.filter(function(t){return t==e}).length},d=function(e){return!Array.isArray(e)&&/^[a-zA-Z]*$/.test(e)},v=function(e){return!Array.isArray(e)&&/^[a-zA-Z0-9]*$/.test(e)},m=function(e){return!Array.isArray(e)&&/^[a-zA-Z0-9_-]*$/.test(e)},y=function(e){return!Array.isArray(e)&&/^[0-9]*$/.test(e)},g=function(e,t){var n=u(t),r=n[0],i=n.slice(1);return new RegExp(r,i).test(String(e))},p=function(e){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(e)},b=function(e,t){for(var n=new RegExp(".("+t.join("|")+")$","i"),r=0;r<e.length;r++)if(!n.test(e[r].name))return!1;return!0},k=function(e,t){for(var n=new RegExp(t.join("|").replace("*",".+")+"$","i"),r=0;r<e.length;r++)if(!n.test(e[r].type))return!1;return!0},_=function(e,t){var n=o(t,1),r=n[0];if(isNaN(r))return!1;for(var i=1024*Number(r),a=0;a<e.length;a++)if(e[a].size>i)return!1;return!0},$=function(e,t){var n=o(t,1),r=n[0],i=String(e);return/^[0-9]*$/.test(i)&&i.length===Number(r)},w=function(e){for(var t=0;t<e.length;t++)if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[t].name))return!1;return!0},T=function(e,t,n){var r=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(t)&&a.height===Number(n)})},a.src=r.createObjectURL(e)})},x=function(e,t){for(var n=o(t,2),r=n[0],i=n[1],a=[],s=0;s<e.length;s++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[s].name))return!1;a.push(e[s])}return Promise.all(a.map(function(e){return T(e,r,i)}))},A=function(e,t){var n=o(t,2),r=n[0],i=n[1];return Number(r)<=e&&Number(i)>=e},E=function(e,t){var n=o(t,1),r=n[0],i=document.querySelector("input[name='"+r+"']");return!(!i||String(e)!==i.value)},L=function(e,t){var n=/^https?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w\.\(\)%-]*)*\/?$/.test(e),r=t&&t[0];return r&&n?new RegExp("^https?://(([da-z.-]+).)*("+t[0].replace(".","\\$&")+")").test(e):n},j=function(e){var t=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],n=o(t,1),r=n[0];if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;var i="*"===r?"*":"{0,"+r+"}",a=new RegExp("^[0-9]*.?[0-9]"+i+"$");return!!a.test(e)&&!Number.isNaN(parseFloat(e))},N={email:e,min:c,max:f,required:n,"in":t,not_in:h,alpha:d,alpha_num:v,alpha_dash:m,numeric:y,regex:g,ip:p,ext:b,mimes:k,size:_,digits:$,image:w,dimensions:x,between:A,confirmed:E,url:L,decimal:j},S=function(){function e(){i(this,e),this.errors=[]}return a(e,[{key:"add",value:function(e,t,n){var r={field:e,msg:t};n&&(r.scope=n),this.errors.push(r)}},{key:"all",value:function(e){return e?this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg}):this.errors.map(function(e){return e.msg})}},{key:"any",value:function(e){return e?!!this.errors.filter(function(t){return t.scope===e}).length:!!this.errors.length}},{key:"clear",value:function(e){return e?void(this.errors=this.errors.filter(function(t){return t.scope!==e})):void(this.errors=[])}},{key:"collect",value:function(e,t){var n=this;if(!e){var i=function(){var e={};return n.errors.forEach(function(t){e[t.field]||(e[t.field]=[]),e[t.field].push(t.msg)}),{v:e}}();if("object"===("undefined"==typeof i?"undefined":r(i)))return i.v}return t?this.errors.filter(function(n){return n.field===e&&n.scope===t}).map(function(e){return e.msg}):this.errors.filter(function(t){return t.field===e}).map(function(e){return e.msg})}},{key:"count",value:function(){return this.errors.length}},{key:"first",value:function(e,t){for(var n=0;n<this.errors.length;n++)if(this.errors[n].field===e){if(!t)return this.errors[n].msg;if(this.errors[n].scope===t)return this.errors[n].msg}return null}},{key:"has",value:function(e,t){for(var n=0;n<this.errors.length;n++)if(this.errors[n].field===e){if(!t)return!0;if(this.errors[n].scope===t)return!0}return!1}},{key:"remove",value:function(e,t){return t?void(this.errors=this.errors.filter(function(n){return n.field!==e||n.scope!==t})):void(this.errors=this.errors.filter(function(t){return t.field!==e}))}}]),e}(),M=function(){function e(t){i(this,e),this.msg=t}return a(e,[{key:"toString",value:function(){return this.msg}}]),e}(),O=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,e),this.dictionary={},this.merge(t)}return a(e,[{key:"hasLocale",value:function(e){return!!this.dictionary[e]}},{key:"getMessage",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?"":arguments[2];return this.hasMessage(e,t)?this.dictionary[e].messages[t]:n}},{key:"getAttribute",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?"":arguments[2];return this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:n}},{key:"hasMessage",value:function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])}},{key:"hasAttribute",value:function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])}},{key:"merge",value:function(e){this._merge(this.dictionary,e)}},{key:"setMessage",value:function(e,t,n){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=n}},{key:"setAttribute",value:function(e,t,n){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=n}},{key:"_isObject",value:function(e){return e&&"object"===("undefined"==typeof e?"undefined":r(e))&&!Array.isArray(e)&&null!==e}},{key:"_merge",value:function(e,t){var n=this;if(!this._isObject(e)||!this._isObject(t))return e;var r=Object.assign||this._assign;return Object.keys(t).forEach(function(i){return n._isObject(t[i])?(e[i]||r(e,s({},i,{})),void n._merge(e[i],t[i])):void r(e,s({},i,t[i]))}),e}},{key:"_assign",value:function(e){for(var t=arguments,n=Object(e),r=function(e){var r=t[e];void 0!==r&&null!==r&&Object.keys(r).forEach(function(e){({}).hasOwnProperty.call(r,e)&&(n[e]=r[e])})},i=1;i<arguments.length;i++)r(i);return n}}]),e}(),V={alpha_dash:function(e){return"The "+e+" may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" may only contain alpha-numeric characters."},alpha:function(e){return"The "+e+" may only contain alphabetic characters."},between:function(e,t){var n=o(t,2),r=n[0],i=n[1];return"The "+e+" must be between "+r+" and "+i+"."},confirmed:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" does not match the "+r+"."},decimal:function(e){var t=arguments.length<=1||void 0===arguments[1]?["*"]:arguments[1],n=o(t,1),r=n[0];return"The "+e+" must be numeric and may contain "+("*"===r?"":r)+" decimal points."},digits:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be numeric and exactly contain "+r+" digits."},dimensions:function(e,t){var n=o(t,2),r=n[0],i=n[1];return"The "+e+" must be "+r+" pixels by "+i+" pixels."},email:function(e){return"The "+e+" must be a valid email."},ext:function(e){return"The "+e+" must be a valid file."},image:function(e){return"The "+e+" must be an image."},"in":function(e){return"The "+e+" must be a valid value."},ip:function(e){return"The "+e+" must be a valid ip address."},max:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" may not be greater than "+r+" characters."},mimes:function(e){return"The "+e+" must have a valid file type."},min:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be at least "+r+" characters."},not_in:function(e){return"The "+e+" must be a valid value."},numeric:function(e){return"The "+e+" may only contain numeric characters."},regex:function(e){return"The "+e+" format is invalid."},required:function(e){return"The "+e+" is required."},size:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be less than "+r+" KB."},url:function(e){return"The "+e+" is not a valid URL."}},B=function(e){return e.dataset.scope||e.form&&e.form.dataset.scope},D=function(e){var t=arguments.length<=1||void 0===arguments[1]?100:arguments[1],n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(!t)return e;var r=void 0;return function(i){function a(){n||e.apply(c,o),r=null}var s=u(i),o=s,c=this;r?clearTimeout(r):n&&e.apply.apply(e,[c].concat(l(o))),r=setTimeout(a,t||100)}},z=function(e){console&&console.warn("vee-validate: "+e)},R=function(e){return function(t,n){var r=o(n,2),i=r[0],a=r[1],s=e(t,a,!0),u=document.querySelector("input[name='"+i+"']");if(!s.isValid()||!u)return!1;var l=e(u.value,a,!0);return!!l.isValid()&&s.isAfter(l)}},q=function(e){return function(t,n){var r=o(n,2),i=r[0],a=r[1],s=e(t,a,!0),u=document.querySelector("input[name='"+i+"']");if(!s.isValid()||!u)return!1;var l=e(u.value,a,!0);return!!l.isValid()&&s.isBefore(l)}},F=function(e){return function(t,n){var r=o(n,1),i=r[0];return e(t,i,!0).isValid()}},P=function(e){return function(t,n){var r=o(n,3),i=r[0],a=r[1],s=r[2],u=e(i,s,!0),l=e(a,s,!0),c=e(t,s,!0);return!!(u.isValid()&&l.isValid()&&c.isValid())&&c.isBetween(u,l)}},Z={after:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be after "+r+"."},before:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be before "+r+"."},date_between:function(e,t){var n=o(t,2),r=n[0],i=n[1];return"The "+e+" must be between "+r+" and "+i+"."},date_format:function(e,t){var n=o(t,1),r=n[0];return"The "+e+" must be in the format "+r+"."}},U={make:function(e){return{date_format:F(e),after:R(e),before:q(e),date_between:P(e)}},messages:Z,installed:!1},C="veeValidate",I="en",Y=!0,K=new O({en:{messages:V,attributes:{}}}),G=function(){function e(t,n){i(this,e),this.locale=I,this.strictMode=Y,this.$fields={},this._createFields(t),this.errorBag=new S,this.$vm=n,"function"==typeof moment&&this.installDateTimeValidators(moment)}return a(e,[{key:"installDateTimeValidators",value:function(t){e.installDateTimeValidators(t)}},{key:"setStrictMode",value:function(){var e=arguments.length<=0||void 0===arguments[0]||arguments[0];this.strictMode=e}},{key:"setLocale",value:function(e){K.hasLocale(e)||z("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),this.locale=e}},{key:"attach",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?null:arguments[2];this.errorBag.remove(e),this._createField(e,t),n&&(this.$fields[e].name=n)}},{key:"updateDictionary",value:function(t){e.updateDictionary(t)}},{key:"detach",value:function(e){delete this.$fields[e]}},{key:"extend",value:function(t,n){e.extend(t,n)}},{key:"validateAll",value:function(e){var t=this;if(this.$vm&&(!e||"string"==typeof e))return this.errorBag.clear(e),void this.$vm.$emit(C,e);var n=!0,r=[];return this.errorBag.clear(),Object.keys(e).forEach(function(i){var a=t.validate(i,e[i]);return"function"==typeof a.then?void r.push(a):void(n=n&&a)}),r.length?Promise.all(r).then(function(e){return e.every(function(e){return e})&&n}):n}},{key:"validate",value:function(e,t,n){var r=this;if(!this.$fields[e])return!this.strictMode||(z('Trying to validate a non-existant field: "'+e+'". Use "attach()" first.'),!1);if(this.errorBag.remove(e,n),!this.$fields[e].required&&~[null,void 0,""].indexOf(t))return!0;var i=!0,a=[];return this.$fields[e].validations.forEach(function(s){var o=r._test(e,t,s,n);return"function"==typeof o.then?void a.push(o):void(i=i&&o)}),a.length?Promise.all(a).then(function(e){return e.every(function(e){return e})&&i}):i}},{key:"_createFields",value:function(e){var t=this;e&&Object.keys(e).forEach(function(n){t._createField(n,e[n])})}},{key:"_createField",value:function(e,t){var n=this;this.$fields[e]||(this.$fields[e]={}),this.$fields[e].validations=[],t.split("|").forEach(function(t){var r=n._normalizeRule(t,n.$fields[e].validations);"required"===r.name&&(n.$fields[e].required=!0),n.$fields[e].validations.push(r)})}},{key:"_normalizeRule",value:function(e,t){var n=[],r=e.split(":")[0];if(~e.indexOf(":")&&(n=e.split(":")[1].split(",")),U.installed&&~["after","before","date_between"].indexOf(r)){var i=t.filter(function(e){return"date_format"===e.name})[0];i&&n.push(i.params[0])}return{name:r,params:n}}},{key:"_formatErrorMessage",value:function(e,t){return K.hasLocale(this.locale)&&"function"==typeof K.getMessage(this.locale,t.name)?K.getMessage(this.locale,t.name)(e,t.params):K.getMessage("en",t.name)(e,t.params)}},{key:"_getFieldDisplayName",value:function(e){return this.$fields[e].name||K.getAttribute(this.locale,e,e)}},{key:"_test",value:function(e,t,n,r){var i=this,a=N[n.name],s=a(t,n.params),o=this._getFieldDisplayName(e);return"function"==typeof s.then?s.then(function(t){var a=Array.isArray(t)?t.every(function(e){return e.valid}):t.valid;return a||i.errorBag.add(e,i._formatErrorMessage(o,n),r),a}):(s||this.errorBag.add(e,this._formatErrorMessage(o,n),r),s)}},{key:"getErrors",value:function(){return this.errorBag}}],[{key:"setDefaultLocale",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"en":arguments[0];K.hasLocale(e)||z("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),I=e}},{key:"setStrictMode",value:function(){var e=arguments.length<=0||void 0===arguments[0]||arguments[0];Y=e}},{key:"installDateTimeValidators",value:function(t){if("function"!=typeof t)return z("To use the date-time validators you must provide moment reference."),!1;if(U.installed)return!0;var n=U.make(t);return Object.keys(n).forEach(function(t){e.extend(t,n[t])}),e.updateDictionary({en:{messages:U.messages}}),U.installed=!0,!0}},{key:"updateDictionary",value:function(e){K.merge(e)}},{key:"create",value:function(t,n){return new e(t,n)}},{key:"extend",value:function(t,n){e._guardExtend(t,n),e._merge(t,n)}},{key:"_merge",value:function(e,t){return"function"==typeof t?(N[e]=t,void K.setMessage("en",e,function(e){return"The "+e+" value is not valid."})):(N[e]=t.validate,t.getMessage&&"function"==typeof t.getMessage&&K.setMessage("en",e,t.getMessage),void(t.messages&&K.merge(Object.keys(t.messages).reduce(function(n,r){var i=n;return i[r]={messages:s({},e,t.messages[r])},i},{}))))}},{key:"_guardExtend",value:function(e,t){if(N[e])throw new M("Extension Error: There is an existing validator with the same name '"+e+"'.");if("function"!=typeof t){if("function"!=typeof t.validate)throw new M("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if("function"!=typeof t.getMessage&&"object"!==r(t.messages))throw new M("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}}}]),e}(),H=[],J=function(e){for(var t=0;t<H.length;t++)if(H[t].$vm===e)return H[t].$validator},Q=function(e){var t=J(e);return t||(t=G.create(void 0,e),H.push({$vm:e,$validator:t})),t},W=function(e){for(var t=0;t<H.length;t++)if(H[t].$vm===e)return H.splice(t,1),!0;return!1},X=function(e){return{data:function(){return s({},e.errorBagName,this.$validator.errorBag)},ready:function(){var e=this;this.$nextTick(function(){e.$emit("validatorReady")})},destroyed:function(){W(this)}}},ee="veeValidate",te=function(){function e(t,n,r,a){i(this,e),this.callbacks=[],this.el=t,this.binding=n,this.vm=r,this.options=a,this.fieldName=n.expression||t.name}return a(e,[{key:"_hasFieldDependency",value:function(e){var t=e.split("|").filter(function(e){return!!e.match(/confirmed|after|before/)});return!!t.length&&t[0].split(":")[1]}},{key:"_inputListener",value:function(){this.vm.$validator.validate(this.fieldName,this.el.value,B(this.el))}},{key:"_fileListener",value:function(){var e=this.vm.$validator.validate(this.fieldName,this.el.files,B(this.el));!e&&this.binding.modifiers.reject&&(el.value="")}},{key:"_radioListener",value:function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');return e?void this.vm.$validator.validate(this.fieldName,e.value,B(this.el)):void this.vm.$validator.validate(this.fieldName,null,B(this.el))}},{key:"_getScopedListener",value:function(e){var t=this;return function(n){(!n||n===B(t.el)||n instanceof Event)&&e()}}},{key:"_attachValidatorEvent",value:function(){var e=this,t=this._getScopedListener("radio"===this.el.type?this._radioListener.bind(this):this._inputListener.bind(this));this.vm.$on(ee,t),this.callbacks.push({event:ee,listener:t});var n=this._hasFieldDependency(this.el.dataset.rules);n&&this.vm.$once("validatorReady",function(){var r=document.querySelector("input[name='"+n+"']");return r?(r.addEventListener("input",t),void e.callbacks.push({event:"input",listener:t,el:r})):void z("Cannot find target field, no additional listeners were attached.")})}},{key:"_getSuitableListener",value:function(){return"file"===this.el.type?{name:"change",listener:this._fileListener}:"radio"===this.el.type?{name:"change",listener:this._radioListener}:{name:"input",listener:this._inputListener}}},{key:"_attachFieldListeners",value:function(){var e=this,t=this._getSuitableListener(),n=D(t.listener.bind(this),this.el.dataset.delay||this.options.delay);return"radio"===this.el.type?void this.vm.$once("validatorReady",function(){[].concat(l(document.querySelectorAll('input[name="'+e.el.name+'"]'))).forEach(function(r){r.addEventListener(t.name,n),e.callbacks.push({event:t.name,callback:n,el:r})})}):(this.el.addEventListener(t.name,n),void this.callbacks.push({event:t.name,callback:n,el:this.el}))}},{key:"attach",value:function(){this.vm.$validator.attach(this.fieldName,this.el.dataset.rules,this.el.dataset.as),this._attachValidatorEvent(),this.binding.expression||this._attachFieldListeners()}},{key:"detach",value:function(){this.vm.$off(ee,this.callbacks.filter(function(e){var t=e.event;return t===ee})[0]),this.callbacks.filter(function(e){var t=e.event;return t!==ee}).forEach(function(e){e.el.removeEventListener(e.event,e.listener)})}}]),e}(),ne=[],re=function(e){return{bind:function(){var t=this;this.vm.$nextTick(function(){t.fieldName=t.expression||t.el.name;var n={expression:t.expression,modifiers:t.modifiers},r=new te(t.el,n,t.vm,e);r.attach(),ne.push({vm:t.vm,el:t.el,instance:r})})},update:function(e){var t=this;if(this.expression)return this.modifiers.initial?void(this.modifiers.initial=!1):this.fieldName?void this.vm.$validator.validate(this.fieldName,e,B(this.el)):void this.vm.$nextTick(function(){t.vm.$validator.validate(t.fieldName,e,B(t.el))})},unbind:function(){var e=this,t=ne.filter(function(t){return t.vm===e.vm&&t.el===e.el})[0];t.instance.detach(),ne.splice(ne.indexOf(t),1)}}},ie=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.locale,r=void 0===n?"en":n,i=t.delay,a=void 0===i?0:i,s=t.errorBagName,o=void 0===s?"errors":s,u=t.dictionary,l=void 0===u?null:u,c=t.strict,f=void 0===c||c;l&&G.updateDictionary(l),G.setDefaultLocale(r),G.setStrictMode(f);var h={locale:r,delay:a,dictionary:l,errorBagName:o};Object.defineProperties(e.prototype,{$validator:{get:function(){return Q(this)}}}),e.mixin(X(h)),e.directive("validate",re(h))},ae={install:ie,Validator:G,ErrorBag:S};return ae});
{
"name": "vee-validate",
"version": "1.0.0-beta.6",
"version": "1.0.0-beta.7",
"description": "Simple Vue.js input validation plugin",

@@ -9,8 +9,6 @@ "main": "dist/vee-validate.js",

"scripts": {
"start": "webpack-dev-server --hot --inline --config webpack.docs.config.js",
"dev": "webpack --progress --colors --watch",
"test": "nyc ava --colors",
"test:watch": "ava --watch",
"lint": "eslint ./src ./test",
"build": "webpack && cross-env NODE_ENV=production webpack -p",
"build": "rollup -c rollup.config.dev.js && rollup -c rollup.config.prod.js",
"cover": "nyc report --reporter=lcov > coverage.lcov && codecov"

@@ -23,2 +21,7 @@ },

},
"nyc": {
"exclude": [
"src/utils/helpers.js"
]
},
"keywords": [

@@ -46,4 +49,7 @@ "VueJS",

"nyc": "^7.1.0",
"webpack": "^2.1.0-beta.20"
"rollup": "^0.36.0",
"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-uglify": "^1.0.1"
}
}

@@ -31,3 +31,3 @@ # Vee-Validate

```
bower install vee-validate#1.0.0-beta.6 --save
bower install vee-validate#1.0.0-beta.7 --save
```

@@ -38,5 +38,24 @@

```
bower install vee-validate#2.0.0-beta.11 --save
bower install vee-validate#2.0.0-beta.12 --save
```
### CDN
vee-validate is also available on jsdelivr cdn:
**Vue 1.0**:
```html
<script src="https://cdn.jsdelivr.net/vee-validate/1.0.0-beta.7/vee-validate.min.js"></script>
```
**Vue 2.0**:
```html
<script src="https://cdn.jsdelivr.net/vee-validate/2.0.0-beta.12/vee-validate.min.js"></script>
```
Or select whatever [version](https://www.jsdelivr.com/projects/vee-validate) you would like to use.
### Getting Started

@@ -43,0 +62,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc