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.7.3 to 4.7.4

2

dist/vee-validate-rules.d.ts
interface FieldValidationMetaInfo {
field: string;
name: string;
label?: string;
value: unknown;

@@ -4,0 +6,0 @@ form: Record<string, unknown>;

6

dist/vee-validate-rules.esm.js
/**
* vee-validate v4.7.3
* (c) 2022 Abdelrahman Awad
* vee-validate v4.7.4
* (c) 2023 Abdelrahman Awad
* @license MIT

@@ -288,3 +288,3 @@ */

}
const regex = new RegExp(`.(${extensions.join('|')})$`, 'i');
const regex = new RegExp(`\\.(${extensions.join('|')})$`, 'i');
if (Array.isArray(files)) {

@@ -291,0 +291,0 @@ return files.every(file => regex.test(file.name));

/**
* vee-validate v4.7.3
* (c) 2022 Abdelrahman Awad
* vee-validate v4.7.4
* (c) 2023 Abdelrahman Awad
* @license MIT

@@ -294,3 +294,3 @@ */

}
const regex = new RegExp(`.(${extensions.join('|')})$`, 'i');
const regex = new RegExp(`\\.(${extensions.join('|')})$`, 'i');
if (Array.isArray(files)) {

@@ -297,0 +297,0 @@ return files.every(file => regex.test(file.name));

/**
* vee-validate v4.7.3
* (c) 2022 Abdelrahman Awad
* vee-validate v4.7.4
* (c) 2023 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,ug:/^[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,ug:/^[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,ug:/^[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,ug:/^[0-9A-Zچۋېرتيۇڭوپھسداەىقكلزشغۈبنمژفگخجۆئ_-]*$/i},s=r=>{if(r)return Array.isArray(r)?r[0]:r.locale};function a(r,e){return Array.isArray(r)?r[0]:r[e]}function A(r){return null==r||""===r||!(!Array.isArray(r)||0!==r.length)}const u=(r,t)=>{if(A(r))return!0;const i=s(t);if(Array.isArray(r))return r.every((r=>u(r,{locale:i})));const n=String(r);return i?(e[i]||e.en).test(n):Object.keys(e).some((r=>e[r].test(n)))},o=(r,e)=>{if(A(r))return!0;const t=s(e);if(Array.isArray(r))return r.every((r=>o(r,{locale:t})));const i=String(r);return t?(n[t]||n.en).test(i):Object.keys(n).some((r=>n[r].test(i)))},$=(r,e)=>{if(A(r))return!0;const t=s(e);if(Array.isArray(r))return r.every((r=>$(r,{locale:t})));const n=String(r);return t?(i[t]||i.en).test(n):Object.keys(i).some((r=>i[r].test(n)))},l=(r,e)=>{if(A(r))return!0;const i=s(e);if(Array.isArray(r))return r.every((r=>l(r,{locale:i})));const n=String(r);return i?(t[i]||t.en).test(n):Object.keys(t).some((r=>t[r].test(n)))};const y=(r,e)=>{if(A(r))return!0;const{min:t,max:i}=function(r){return r?Array.isArray(r)?{min:r[0],max:r[1]}:r:{min:0,max:0}}(e);if(Array.isArray(r))return r.every((r=>!!y(r,{min:t,max:i})));const n=Number(r);return Number(t)<=n&&Number(i)>=n},g=(r,e)=>{const t=a(e,"target");return String(r)===String(t)},m=(r,e)=>{if(A(r))return!0;const t=a(e,"length");if(Array.isArray(r))return r.every((r=>m(r,{length:t})));const i=String(r);return/^[0-9]*$/.test(i)&&i.length===Number(t)};const Z=(r,e)=>{if(A(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=[],s=Array.isArray(r)?r:[r];for(let r=0;r<s.length;r++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(s[r].name))return Promise.resolve(!1);n.push(s[r])}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))))},c=r=>{if(A(r))return!0;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))},f=(r,e)=>{if(A(r))return!0;e||(e=[]);const t=new RegExp(`.(${e.join("|")})$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.name))):t.test(r.name)},h=r=>{if(A(r))return!0;const e=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return Array.isArray(r)?r.every((r=>e.test(r.name))):e.test(r.name)},p=r=>!!A(r)||(Array.isArray(r)?r.every((r=>/^-?[0-9]+$/.test(String(r)))):/^-?[0-9]+$/.test(String(r))),d=(r,e)=>r===a(e,"other"),_=(r,e)=>r!==a(e,"other");function v(r){return null==r}const b=(r,e)=>{const t=a(e,"length");return!v(r)&&("number"==typeof r&&(r=String(r)),r.length||(r=Array.from(r)),r.length===Number(t))},x=(r,e)=>{if(A(r))return!0;const t=a(e,"length");return Array.isArray(r)?r.every((r=>x(r,{length:t}))):String(r).length<=Number(t)},w=(r,e)=>{if(A(r))return!0;const t=a(e,"max");return Array.isArray(r)?r.length>0&&r.every((r=>w(r,{max:t}))):Number(r)<=Number(t)},N=(r,e)=>{if(A(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)},S=(r,e)=>{if(A(r))return!0;const t=a(e,"length");return Array.isArray(r)?r.every((r=>S(r,{length:t}))):String(r).length>=Number(t)},j=(r,e)=>{if(A(r))return!0;const t=a(e,"min");return Array.isArray(r)?r.length>0&&r.every((r=>j(r,{min:t}))):Number(r)>=Number(t)},k=(r,e)=>!!A(r)||(Array.isArray(r)?r.every((r=>k(r,e))):Array.from(e).some((e=>e==r))),z=(r,e)=>!!A(r)||!k(r,e),R=/^[٠١٢٣٤٥٦٧٨٩]+$/,F=/^[0-9]+$/,O=r=>{if(A(r))return!0;const e=r=>{const e=String(r);return F.test(e)||R.test(e)};return Array.isArray(r)?r.every(e):e(r)},C=(r,e)=>{if(A(r))return!0;let t=a(e,"regex");return"string"==typeof t&&(t=new RegExp(t)),Array.isArray(r)?r.every((r=>C(r,{regex:t}))):t.test(String(r))},E=r=>{return!v(r)&&(e=r,!Array.isArray(e)||0!==e.length)&&!1!==r&&!!String(r).trim().length;var e},L=(r,e)=>{if(A(r))return!0;let t=a(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},P=(r,e)=>{var t;if(A(r))return!0;let i=a(e,"pattern");"string"==typeof i&&(i=new RegExp(i));try{new URL(r)}catch(r){return!1}return null===(t=null==i?void 0:i.test(r))||void 0===t||t},U={alpha_dash:o,alpha_num:$,alpha_spaces:l,alpha:u,between:y,confirmed:g,digits:m,dimensions:Z,email:c,ext:f,image:h,integer:p,is_not:_,is:d,length:b,max_value:w,max:x,mimes:N,min_value:j,min:S,not_one_of:z,numeric:O,one_of:k,regex:C,required:E,size:L,url:P};r.alpha=u,r.alpha_dash=o,r.alpha_num=$,r.alpha_spaces=l,r.between=y,r.confirmed=g,r.default=U,r.digits=m,r.dimensions=Z,r.email=c,r.ext=f,r.image=h,r.integer=p,r.is=d,r.is_not=_,r.length=b,r.max=x,r.max_value=w,r.mimes=N,r.min=S,r.min_value=j,r.not_one_of=z,r.numeric=O,r.one_of=k,r.regex=C,r.required=E,r.size=L,r.url=P,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,ug:/^[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,ug:/^[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,ug:/^[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,ug:/^[0-9A-Zچۋېرتيۇڭوپھسداەىقكلزشغۈبنمژفگخجۆئ_-]*$/i},s=r=>{if(r)return Array.isArray(r)?r[0]:r.locale};function a(r,e){return Array.isArray(r)?r[0]:r[e]}function A(r){return null==r||""===r||!(!Array.isArray(r)||0!==r.length)}const u=(r,t)=>{if(A(r))return!0;const i=s(t);if(Array.isArray(r))return r.every((r=>u(r,{locale:i})));const n=String(r);return i?(e[i]||e.en).test(n):Object.keys(e).some((r=>e[r].test(n)))},o=(r,e)=>{if(A(r))return!0;const t=s(e);if(Array.isArray(r))return r.every((r=>o(r,{locale:t})));const i=String(r);return t?(n[t]||n.en).test(i):Object.keys(n).some((r=>n[r].test(i)))},$=(r,e)=>{if(A(r))return!0;const t=s(e);if(Array.isArray(r))return r.every((r=>$(r,{locale:t})));const n=String(r);return t?(i[t]||i.en).test(n):Object.keys(i).some((r=>i[r].test(n)))},l=(r,e)=>{if(A(r))return!0;const i=s(e);if(Array.isArray(r))return r.every((r=>l(r,{locale:i})));const n=String(r);return i?(t[i]||t.en).test(n):Object.keys(t).some((r=>t[r].test(n)))};const y=(r,e)=>{if(A(r))return!0;const{min:t,max:i}=function(r){return r?Array.isArray(r)?{min:r[0],max:r[1]}:r:{min:0,max:0}}(e);if(Array.isArray(r))return r.every((r=>!!y(r,{min:t,max:i})));const n=Number(r);return Number(t)<=n&&Number(i)>=n},g=(r,e)=>{const t=a(e,"target");return String(r)===String(t)},m=(r,e)=>{if(A(r))return!0;const t=a(e,"length");if(Array.isArray(r))return r.every((r=>m(r,{length:t})));const i=String(r);return/^[0-9]*$/.test(i)&&i.length===Number(t)};const Z=(r,e)=>{if(A(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=[],s=Array.isArray(r)?r:[r];for(let r=0;r<s.length;r++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(s[r].name))return Promise.resolve(!1);n.push(s[r])}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))))},c=r=>{if(A(r))return!0;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))},f=(r,e)=>{if(A(r))return!0;e||(e=[]);const t=new RegExp(`\\.(${e.join("|")})$`,"i");return Array.isArray(r)?r.every((r=>t.test(r.name))):t.test(r.name)},h=r=>{if(A(r))return!0;const e=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return Array.isArray(r)?r.every((r=>e.test(r.name))):e.test(r.name)},p=r=>!!A(r)||(Array.isArray(r)?r.every((r=>/^-?[0-9]+$/.test(String(r)))):/^-?[0-9]+$/.test(String(r))),d=(r,e)=>r===a(e,"other"),_=(r,e)=>r!==a(e,"other");function v(r){return null==r}const b=(r,e)=>{const t=a(e,"length");return!v(r)&&("number"==typeof r&&(r=String(r)),r.length||(r=Array.from(r)),r.length===Number(t))},x=(r,e)=>{if(A(r))return!0;const t=a(e,"length");return Array.isArray(r)?r.every((r=>x(r,{length:t}))):String(r).length<=Number(t)},w=(r,e)=>{if(A(r))return!0;const t=a(e,"max");return Array.isArray(r)?r.length>0&&r.every((r=>w(r,{max:t}))):Number(r)<=Number(t)},N=(r,e)=>{if(A(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)},S=(r,e)=>{if(A(r))return!0;const t=a(e,"length");return Array.isArray(r)?r.every((r=>S(r,{length:t}))):String(r).length>=Number(t)},j=(r,e)=>{if(A(r))return!0;const t=a(e,"min");return Array.isArray(r)?r.length>0&&r.every((r=>j(r,{min:t}))):Number(r)>=Number(t)},k=(r,e)=>!!A(r)||(Array.isArray(r)?r.every((r=>k(r,e))):Array.from(e).some((e=>e==r))),z=(r,e)=>!!A(r)||!k(r,e),R=/^[٠١٢٣٤٥٦٧٨٩]+$/,F=/^[0-9]+$/,O=r=>{if(A(r))return!0;const e=r=>{const e=String(r);return F.test(e)||R.test(e)};return Array.isArray(r)?r.every(e):e(r)},C=(r,e)=>{if(A(r))return!0;let t=a(e,"regex");return"string"==typeof t&&(t=new RegExp(t)),Array.isArray(r)?r.every((r=>C(r,{regex:t}))):t.test(String(r))},E=r=>{return!v(r)&&(e=r,!Array.isArray(e)||0!==e.length)&&!1!==r&&!!String(r).trim().length;var e},L=(r,e)=>{if(A(r))return!0;let t=a(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},P=(r,e)=>{var t;if(A(r))return!0;let i=a(e,"pattern");"string"==typeof i&&(i=new RegExp(i));try{new URL(r)}catch(r){return!1}return null===(t=null==i?void 0:i.test(r))||void 0===t||t},U={alpha_dash:o,alpha_num:$,alpha_spaces:l,alpha:u,between:y,confirmed:g,digits:m,dimensions:Z,email:c,ext:f,image:h,integer:p,is_not:_,is:d,length:b,max_value:w,max:x,mimes:N,min_value:j,min:S,not_one_of:z,numeric:O,one_of:k,regex:C,required:E,size:L,url:P};r.alpha=u,r.alpha_dash=o,r.alpha_num=$,r.alpha_spaces=l,r.between=y,r.confirmed=g,r.default=U,r.digits=m,r.dimensions=Z,r.email=c,r.ext=f,r.image=h,r.integer=p,r.is=d,r.is_not=_,r.length=b,r.max=x,r.max_value=w,r.mimes=N,r.min=S,r.min_value=j,r.not_one_of=z,r.numeric=O,r.one_of=k,r.regex=C,r.required=E,r.size=L,r.url=P,Object.defineProperty(r,"__esModule",{value:!0})}));
{
"name": "@vee-validate/rules",
"version": "4.7.3",
"version": "4.7.4",
"description": "Form Validation for Vue.js",

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

],
"gitHead": "e74fa66fe186904958844aa5c8a1abcbced94033"
"gitHead": "dce6575a71c42e5346bc8c2dc7fc0b211a2020be"
}
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