Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vee-validate/rules

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vee-validate/rules - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [4.0.3](https://github.com/logaretm/vee-validate/compare/@vee-validate/rules@4.0.2...@vee-validate/rules@4.0.3) (2020-12-07)
### Bug Fixes
* cast digits param to number when in string format closes [#3067](https://github.com/logaretm/vee-validate/issues/3067) ([e7eb242](https://github.com/logaretm/vee-validate/commit/e7eb242a0ee9effa217133a3321e877b11cec652))
## [4.0.2](https://github.com/logaretm/vee-validate/compare/@vee-validate/rules@4.0.1...@vee-validate/rules@4.0.2) (2020-12-05)

@@ -8,0 +19,0 @@

4

dist/vee-validate-rules.esm.js
/**
* vee-validate v4.0.2
* vee-validate v4.0.3
* (c) 2020 Abdelrahman Awad

@@ -192,3 +192,3 @@ * @license MIT

const strVal = String(value);
return /^[0-9]*$/.test(strVal) && strVal.length === length;
return /^[0-9]*$/.test(strVal) && strVal.length === Number(length);
};

@@ -195,0 +195,0 @@

/**
* vee-validate v4.0.2
* vee-validate v4.0.3
* (c) 2020 Abdelrahman Awad

@@ -198,3 +198,3 @@ * @license MIT

const strVal = String(value);
return /^[0-9]*$/.test(strVal) && strVal.length === length;
return /^[0-9]*$/.test(strVal) && strVal.length === Number(length);
};

@@ -201,0 +201,0 @@

/**
* vee-validate v4.0.2
* vee-validate v4.0.3
* (c) 2020 Abdelrahman Awad
* @license MIT
*/
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).VeeValidateRules={})}(this,(function(r){"use strict";const e={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[А-ЯЁ]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,sv:/^[A-ZÅÄÖ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[A-ZÇƏĞİıÖŞÜ]*$/i},t={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,sv:/^[A-ZÅÄÖ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/,az:/^[A-ZÇƏĞİıÖŞÜ\s]*$/i},i={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,sv:/^[0-9A-ZÅÄÖ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ]*$/i},n={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,sv:/^[0-9A-ZÅÄÖ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i},s=r=>{if(r)return Array.isArray(r)?r[0]:r.locale},A=(r,t)=>{const i=s(t);return Array.isArray(r)?r.every((r=>A(r,{locale:i}))):i?(e[i]||e.en).test(r):Object.keys(e).some((t=>e[t].test(r)))},a=(r,e)=>{const t=s(e);return Array.isArray(r)?r.every((r=>a(r,{locale:t}))):t?(n[t]||n.en).test(r):Object.keys(n).some((e=>n[e].test(r)))},$=(r,e)=>{const t=s(e);return Array.isArray(r)?r.every((r=>$(r,{locale:t}))):t?(i[t]||i.en).test(r):Object.keys(i).some((e=>i[e].test(r)))},o=(r,e)=>{const i=s(e);return Array.isArray(r)?r.every((r=>o(r,{locale:i}))):i?(t[i]||t.en).test(r):Object.keys(t).some((e=>t[e].test(r)))};const u=(r,e)=>{const{min:t,max:i}=function(r){return r?Array.isArray(r)?{min:r[0],max:r[1]}:r:{min:0,max:0}}(e);return Array.isArray(r)?r.every((r=>!!u(r,{min:t,max:i}))):Number(t)<=r&&Number(i)>=r};function y(r,e){if(r)return Array.isArray(r)?r[0]:r[e]}const Z=(r,e)=>{const t=y(e,"length");if(Array.isArray(r))return r.every((r=>Z(r,{length:t})));const i=String(r);return/^[0-9]*$/.test(i)&&i.length===t};function l(r){return null==r}const g=(r,e)=>{const t=y(e,"length");return l(r)?t>=0:Array.isArray(r)?r.every((r=>g(r,{length:t}))):String(r).length<=Number(t)},m=(r,e)=>{const t=y(e,"max");return!l(r)&&""!==r&&(Array.isArray(r)?r.length>0&&r.every((r=>m(r,{max:t}))):Number(r)<=Number(t))},c=(r,e)=>{const t=y(e,"length");return!l(r)&&(Array.isArray(r)?r.every((r=>c(r,{length:t}))):String(r).length>=Number(t))},h=(r,e)=>{const t=y(e,"min");return!l(r)&&""!==r&&(Array.isArray(r)?r.length>0&&r.every((r=>h(r,{min:t}))):Number(r)>=Number(t))},f=(r,e)=>Array.isArray(r)?r.every((r=>f(r,e))):Array.from(e).some((e=>e==r)),p=/^[٠١٢٣٤٥٦٧٨٩]+$/,d=/^[0-9]+$/,_=(r,e)=>{let t=y(e,"regex");return"string"==typeof t&&(t=new RegExp(t)),Array.isArray(r)?r.every((r=>_(r,{regex:t}))):t.test(String(r))};r.alpha=A,r.alpha_dash=a,r.alpha_num=$,r.alpha_spaces=o,r.between=u,r.confirmed=(r,e)=>{const t=y(e,"target");return String(r)===String(t)},r.digits=Z,r.dimensions=(r,e)=>{if(!r)return!0;const{width:t,height:i}=function(r){return r?Array.isArray(r)?{width:Number(r[0]),height:Number(r[1])}:{width:Number(r.width),height:Number(r.height)}:{width:0,height:0}}(e),n=[];r=Array.isArray(r)?r:[r];for(let e=0;e<r.length;e++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(r[e].name))return Promise.resolve(!1);n.push(r[e])}return Promise.all(n.map((r=>((r,e,t)=>{const i=window.URL||window.webkitURL;return new Promise((n=>{const s=new Image;s.onerror=()=>n(!1),s.onload=()=>n(s.width===e&&s.height===t),s.src=i.createObjectURL(r)}))})(r,t,i)))).then((r=>r.every((r=>r))))},r.email=r=>{const e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return Array.isArray(r)?r.every((r=>e.test(String(r)))):e.test(String(r))},r.ext=(r,e)=>{if(e||(e=[]),!r)return!0;const t=new RegExp(`.(${e.join("|")})$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.name))):t.test(r.name)},r.image=r=>{const e=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return!r||(Array.isArray(r)?r.every((r=>e.test(r.name))):e.test(r.name))},r.integer=r=>Array.isArray(r)?r.every((r=>/^-?[0-9]+$/.test(String(r)))):/^-?[0-9]+$/.test(String(r)),r.is=(r,e)=>r===y(e,"other"),r.is_not=(r,e)=>r!==y(e,"other"),r.length=(r,e)=>{const t=y(e,"length");return!l(r)&&("number"==typeof r&&(r=String(r)),r.length||(r=Array.from(r)),r.length===Number(t))},r.max=g,r.max_value=m,r.mimes=(r,e)=>{if(!r)return!0;e||(e=[]);const t=new RegExp(`${e.join("|").replace("*",".+")}$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.type))):t.test(r.type)},r.min=c,r.min_value=h,r.not_one_of=(r,e)=>!f(r,e),r.numeric=r=>{const e=r=>{const e=String(r);return d.test(e)||p.test(e)};return Array.isArray(r)?r.every(e):e(r)},r.one_of=f,r.regex=_,r.required=r=>{return!l(r)&&(e=r,!Array.isArray(e)||0!==e.length)&&!1!==r&&!!String(r).trim().length;var e},r.size=(r,e)=>{if(!r)return!0;let t=y(e,"size");if(t=Number(t),isNaN(t))return!1;const i=1024*t;if(!Array.isArray(r))return r.size<=i;for(let e=0;e<r.length;e++)if(r[e].size>i)return!1;return!0},Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).VeeValidateRules={})}(this,(function(r){"use strict";const e={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[А-ЯЁ]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,sv:/^[A-ZÅÄÖ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[A-ZÇƏĞİıÖŞÜ]*$/i},t={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,sv:/^[A-ZÅÄÖ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/,az:/^[A-ZÇƏĞİıÖŞÜ\s]*$/i},i={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,sv:/^[0-9A-ZÅÄÖ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ]*$/i},n={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,sv:/^[0-9A-ZÅÄÖ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i},s=r=>{if(r)return Array.isArray(r)?r[0]:r.locale},A=(r,t)=>{const i=s(t);return Array.isArray(r)?r.every((r=>A(r,{locale:i}))):i?(e[i]||e.en).test(r):Object.keys(e).some((t=>e[t].test(r)))},a=(r,e)=>{const t=s(e);return Array.isArray(r)?r.every((r=>a(r,{locale:t}))):t?(n[t]||n.en).test(r):Object.keys(n).some((e=>n[e].test(r)))},$=(r,e)=>{const t=s(e);return Array.isArray(r)?r.every((r=>$(r,{locale:t}))):t?(i[t]||i.en).test(r):Object.keys(i).some((e=>i[e].test(r)))},u=(r,e)=>{const i=s(e);return Array.isArray(r)?r.every((r=>u(r,{locale:i}))):i?(t[i]||t.en).test(r):Object.keys(t).some((e=>t[e].test(r)))};const o=(r,e)=>{const{min:t,max:i}=function(r){return r?Array.isArray(r)?{min:r[0],max:r[1]}:r:{min:0,max:0}}(e);return Array.isArray(r)?r.every((r=>!!o(r,{min:t,max:i}))):Number(t)<=r&&Number(i)>=r};function y(r,e){if(r)return Array.isArray(r)?r[0]:r[e]}const Z=(r,e)=>{const t=y(e,"length");if(Array.isArray(r))return r.every((r=>Z(r,{length:t})));const i=String(r);return/^[0-9]*$/.test(i)&&i.length===Number(t)};function l(r){return null==r}const g=(r,e)=>{const t=y(e,"length");return l(r)?t>=0:Array.isArray(r)?r.every((r=>g(r,{length:t}))):String(r).length<=Number(t)},m=(r,e)=>{const t=y(e,"max");return!l(r)&&""!==r&&(Array.isArray(r)?r.length>0&&r.every((r=>m(r,{max:t}))):Number(r)<=Number(t))},c=(r,e)=>{const t=y(e,"length");return!l(r)&&(Array.isArray(r)?r.every((r=>c(r,{length:t}))):String(r).length>=Number(t))},h=(r,e)=>{const t=y(e,"min");return!l(r)&&""!==r&&(Array.isArray(r)?r.length>0&&r.every((r=>h(r,{min:t}))):Number(r)>=Number(t))},f=(r,e)=>Array.isArray(r)?r.every((r=>f(r,e))):Array.from(e).some((e=>e==r)),p=/^[٠١٢٣٤٥٦٧٨٩]+$/,d=/^[0-9]+$/,_=(r,e)=>{let t=y(e,"regex");return"string"==typeof t&&(t=new RegExp(t)),Array.isArray(r)?r.every((r=>_(r,{regex:t}))):t.test(String(r))};r.alpha=A,r.alpha_dash=a,r.alpha_num=$,r.alpha_spaces=u,r.between=o,r.confirmed=(r,e)=>{const t=y(e,"target");return String(r)===String(t)},r.digits=Z,r.dimensions=(r,e)=>{if(!r)return!0;const{width:t,height:i}=function(r){return r?Array.isArray(r)?{width:Number(r[0]),height:Number(r[1])}:{width:Number(r.width),height:Number(r.height)}:{width:0,height:0}}(e),n=[];r=Array.isArray(r)?r:[r];for(let e=0;e<r.length;e++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(r[e].name))return Promise.resolve(!1);n.push(r[e])}return Promise.all(n.map((r=>((r,e,t)=>{const i=window.URL||window.webkitURL;return new Promise((n=>{const s=new Image;s.onerror=()=>n(!1),s.onload=()=>n(s.width===e&&s.height===t),s.src=i.createObjectURL(r)}))})(r,t,i)))).then((r=>r.every((r=>r))))},r.email=r=>{const e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return Array.isArray(r)?r.every((r=>e.test(String(r)))):e.test(String(r))},r.ext=(r,e)=>{if(e||(e=[]),!r)return!0;const t=new RegExp(`.(${e.join("|")})$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.name))):t.test(r.name)},r.image=r=>{const e=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return!r||(Array.isArray(r)?r.every((r=>e.test(r.name))):e.test(r.name))},r.integer=r=>Array.isArray(r)?r.every((r=>/^-?[0-9]+$/.test(String(r)))):/^-?[0-9]+$/.test(String(r)),r.is=(r,e)=>r===y(e,"other"),r.is_not=(r,e)=>r!==y(e,"other"),r.length=(r,e)=>{const t=y(e,"length");return!l(r)&&("number"==typeof r&&(r=String(r)),r.length||(r=Array.from(r)),r.length===Number(t))},r.max=g,r.max_value=m,r.mimes=(r,e)=>{if(!r)return!0;e||(e=[]);const t=new RegExp(`${e.join("|").replace("*",".+")}$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.type))):t.test(r.type)},r.min=c,r.min_value=h,r.not_one_of=(r,e)=>!f(r,e),r.numeric=r=>{const e=r=>{const e=String(r);return d.test(e)||p.test(e)};return Array.isArray(r)?r.every(e):e(r)},r.one_of=f,r.regex=_,r.required=r=>{return!l(r)&&(e=r,!Array.isArray(e)||0!==e.length)&&!1!==r&&!!String(r).trim().length;var e},r.size=(r,e)=>{if(!r)return!0;let t=y(e,"size");if(t=Number(t),isNaN(t))return!1;const i=1024*t;if(!Array.isArray(r))return r.size<=i;for(let e=0;e<r.length;e++)if(r[e].size>i)return!1;return!0},Object.defineProperty(r,"__esModule",{value:!0})}));
{
"name": "@vee-validate/rules",
"version": "4.0.2",
"version": "4.0.3",
"description": "Template Based Validation Framework for Vue.js",

@@ -26,3 +26,3 @@ "author": "Abdelrahman Awad <logaretm1@gmail.com>",

],
"gitHead": "4a03e26f7e8d6b56e726681d6fe3ab4c9d9e2a4b"
"gitHead": "03c783b4f356e70770ada11d9248e7d227fe2511"
}
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