diff --git a/404.html b/404.html index d4a4945..a92e5cb 100644 --- a/404.html +++ b/404.html @@ -6,15 +6,15 @@ Page Not Found | express-validator - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/12cfeaca.dea5c244.js b/assets/js/12cfeaca.dea5c244.js new file mode 100644 index 0000000..6d79b37 --- /dev/null +++ b/assets/js/12cfeaca.dea5c244.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8583],{3769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/4c8950db.2ac46611.js b/assets/js/4c8950db.9a712ed9.js similarity index 82% rename from assets/js/4c8950db.2ac46611.js rename to assets/js/4c8950db.9a712ed9.js index be552ad..146caf2 100644 --- a/assets/js/4c8950db.2ac46611.js +++ b/assets/js/4c8950db.9a712ed9.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2796],{5318:(e,a,n)=>{n.d(a,{Zo:()=>m,kt:()=>u});var t=n(7378);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),d=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},m=function(e){var a=d(e.components);return t.createElement(p.Provider,{value:a},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},N=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),k=d(n),N=i,u=k["".concat(p,".").concat(N)]||k[N]||s[N]||l;return n?t.createElement(u,r(r({ref:a},m),{},{components:n})):t.createElement(u,r({ref:a},m))}));function u(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=N;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[k]="string"==typeof e?e:i,r[1]=o;for(var d=2;d{n.r(a),n.d(a,{assets:()=>C,contentTitle:()=>u,default:()=>v,frontMatter:()=>N,metadata:()=>c,toc:()=>h});var t=n(5773),i=n(808),l=(n(7378),n(5318)),r=["components"],o={toc:[{value:"contains()",id:"contains",level:4},{value:"equals()",id:"equals",level:4},{value:"isAfter()",id:"isafter",level:4},{value:"isAlpha()",id:"isalpha",level:4},{value:"isAlphanumeric()",id:"isalphanumeric",level:4},{value:"isAscii()",id:"isascii",level:4},{value:"isBase32()",id:"isbase32",level:4},{value:"isBase58()",id:"isbase58",level:4},{value:"isBase64()",id:"isbase64",level:4},{value:"isBefore()",id:"isbefore",level:4},{value:"isBIC()",id:"isbic",level:4},{value:"isBoolean()",id:"isboolean",level:4},{value:"isBtcAddress()",id:"isbtcaddress",level:4},{value:"isByteLength()",id:"isbytelength",level:4},{value:"isCreditCard()",id:"iscreditcard",level:4},{value:"isCurrency()",id:"iscurrency",level:4},{value:"isDataURI()",id:"isdatauri",level:4},{value:"isDate()",id:"isdate",level:4},{value:"isDecimal()",id:"isdecimal",level:4},{value:"isDivisibleBy()",id:"isdivisibleby",level:4},{value:"isEAN()",id:"isean",level:4},{value:"isEmail()",id:"isemail",level:4},{value:"isEmpty()",id:"isempty",level:4},{value:"isEthereumAddress()",id:"isethereumaddress",level:4},{value:"isFQDN()",id:"isfqdn",level:4},{value:"isFloat()",id:"isfloat",level:4},{value:"isFullWidth()",id:"isfullwidth",level:4},{value:"isHalfWidth()",id:"ishalfwidth",level:4},{value:"isHash()",id:"ishash",level:4},{value:"isHexColor()",id:"ishexcolor",level:4},{value:"isHexadecimal()",id:"ishexadecimal",level:4},{value:"isHSL()",id:"ishsl",level:4},{value:"isIBAN()",id:"isiban",level:4},{value:"isIdentityCard()",id:"isidentitycard",level:4},{value:"isIMEI()",id:"isimei",level:4},{value:"isIP()",id:"isip",level:4},{value:"isIPRange()",id:"isiprange",level:4},{value:"isISBN()",id:"isisbn",level:4},{value:"isISSN()",id:"isissn",level:4},{value:"isISIN()",id:"isisin",level:4},{value:"isISO6391()",id:"isiso6391",level:4},{value:"isISO8601()",id:"isiso8601",level:4},{value:"isISO31661Alpha2()",id:"isiso31661alpha2",level:4},{value:"isISO31661Alpha3()",id:"isiso31661alpha3",level:4},{value:"isISO4217()",id:"isiso4217",level:4},{value:"isISRC()",id:"isisrc",level:4},{value:"isIn()",id:"isin",level:4},{value:"isInt()",id:"isint",level:4},{value:"isJSON()",id:"isjson",level:4},{value:"isJWT()",id:"isjwt",level:4},{value:"isLatLong()",id:"islatlong",level:4},{value:"isLength()",id:"islength",level:4},{value:"isLicensePlate()",id:"islicenseplate",level:4},{value:"isLocale()",id:"islocale",level:4},{value:"isLowercase()",id:"islowercase",level:4},{value:"isLuhnNumber()",id:"isluhnnumber",level:4},{value:"isMagnetURI()",id:"ismagneturi",level:4},{value:"isMACAddress()",id:"ismacaddress",level:4},{value:"isMD5()",id:"ismd5",level:4},{value:"isMimeType()",id:"ismimetype",level:4},{value:"isMobilePhone()",id:"ismobilephone",level:4},{value:"isMongoId()",id:"ismongoid",level:4},{value:"isMultibyte()",id:"ismultibyte",level:4},{value:"isNumeric()",id:"isnumeric",level:4},{value:"isOctal()",id:"isoctal",level:4},{value:"isPassportNumber()",id:"ispassportnumber",level:4},{value:"isPort()",id:"isport",level:4},{value:"isPostalCode()",id:"ispostalcode",level:4},{value:"isRgbColor()",id:"isrgbcolor",level:4},{value:"isRFC3339()",id:"isrfc3339",level:4},{value:"isSemVer()",id:"issemver",level:4},{value:"isSlug()",id:"isslug",level:4},{value:"isStrongPassword()",id:"isstrongpassword",level:4},{value:"isSurrogatePair()",id:"issurrogatepair",level:4},{value:"isTaxID()",id:"istaxid",level:4},{value:"isTime()",id:"istime",level:4},{value:"isURL()",id:"isurl",level:4},{value:"isUUID()",id:"isuuid",level:4},{value:"isUppercase()",id:"isuppercase",level:4},{value:"isVariableWidth()",id:"isvariablewidth",level:4},{value:"isVAT()",id:"isvat",level:4},{value:"isWhitelisted()",id:"iswhitelisted",level:4},{value:"matches()",id:"matches",level:4}]};function p(e){var a=e.components,n=(0,i.Z)(e,r);return(0,l.kt)("wrapper",(0,t.Z)({},o,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"contains"},(0,l.kt)("inlineCode",{parentName:"h4"},"contains()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"contains(elem: any, options?: {\n ignoreCase?: boolean;\n minOccurrences?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"equals"},(0,l.kt)("inlineCode",{parentName:"h4"},"equals()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"equals(comparison: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isafter"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAfter()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAfter(dateOrOptions?: string | {\n comparisonDate?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isalpha"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlpha()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlpha(locale?: AlphaLocale, options?: {\n ignore?: string | string[] | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphaLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isalphanumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlphanumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlphanumeric(locale?: AlphanumericLocale, options?: {\n ignore?: string | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphanumericLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isascii"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAscii()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAscii(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase32"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase32()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase32(options?: {\n crockford?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase58"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase58()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase58(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase64"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase64()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase64(options?: {\n urlSafe?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbefore"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBefore()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBefore(date?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isbic"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBIC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBIC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBoolean(options?: {\n strict?: boolean;\n loose?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbtcaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBtcAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBtcAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbytelength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isByteLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isByteLength(options: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscreditcard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCreditCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCreditCard(options?: {\n provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscurrency"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCurrency()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCurrency(options?: {\n symbol?: string;\n require_symbol?: boolean;\n allow_space_after_symbol?: boolean;\n symbol_after_digits?: boolean;\n allow_negatives?: boolean;\n parens_for_negatives?: boolean;\n negative_sign_before_digits?: boolean;\n negative_sign_after_digits?: boolean;\n allow_negative_sign_placeholder?: boolean;\n thousands_separator?: string;\n decimal_separator?: string;\n allow_decimal?: boolean;\n require_decimal?: boolean;\n digits_after_decimal?: number[];\n allow_space_after_digits?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdatauri"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDataURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDataURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"isdate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDate(options?: {\n format?: string;\n delimiters?: string[];\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDecimal(options?: {\n decimal_digits?: string;\n force_decimal?: boolean;\n locale?: AlphanumericLocale;\n blacklisted_chars?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdivisibleby"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDivisibleBy()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDivisibleBy(number: number): ValidationChain\n")),(0,l.kt)("h4",{id:"isean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmail(options?: {\n allow_display_name?: boolean;\n allow_utf8_local_part?: boolean;\n require_tld?: boolean;\n ignore_max_length?: boolean;\n allow_ip_domain?: boolean;\n domain_specific_validation?: boolean;\n blacklisted_chars?: string;\n host_blacklist?: string[];\n host_whitelist?: string[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isempty"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(options?: {\n ignore_whitespace: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isethereumaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEthereumAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEthereumAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isfqdn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFQDN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFQDN(options?: {\n require_tld?: boolean;\n allow_underscores?: boolean;\n allow_trailing_dot?: boolean;\n allow_numeric_tld?: boolean;\n allow_wildcard?: boolean;\n ignore_max_length?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFloat(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfullwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFullWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFullWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishalfwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHalfWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHalfWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishash"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHash()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHash(algorithm: HashAlgorithm): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of HashAlgorithm"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha256'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha384'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha512'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger192'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32b'")))),(0,l.kt)("h4",{id:"ishexcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexColor(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishexadecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexadecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexadecimal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishsl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHSL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHSL(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiban"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIBAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIBAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isidentitycard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIdentityCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIdentityCard(locale?: IdentityCardLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IdentityCardLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hk-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"isimei"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIMEI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIMEI(options?: {\n allow_hyphens?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isip"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIP()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIP(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isiprange"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIPRange()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIPRange(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isisbn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISBN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISBN(versionOrOptions?: number | {\n version?: '10' | '13';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isissn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISSN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISSN(options?: {\n case_sensitive?: boolean;\n require_hyphen?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isisin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISIN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISIN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso6391"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO6391()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO6391(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso8601"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO8601()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO8601(options?: {\n strict?: boolean;\n strictSeparator?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha2"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha2()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha2(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha3"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha3()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha3(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso4217"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO4217()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO4217(): ValidationChain\n")),(0,l.kt)("h4",{id:"isisrc"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISRC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISRC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIn()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIn(values: readonly any[]): ValidationChain\n")),(0,l.kt)("h4",{id:"isint"},(0,l.kt)("inlineCode",{parentName:"h4"},"isInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isInt(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n allow_leading_zeroes?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjson"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJSON()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJSON(options?: {\n allow_primitives?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjwt"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJWT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJWT(): ValidationChain\n")),(0,l.kt)("h4",{id:"islatlong"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLatLong()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLatLong(options?: {\n checkDMS?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLength(options: {\n min?: number;\n max?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islicenseplate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLicensePlate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLicensePlate(locale: IsLicensePlateLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IsLicensePlateLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")))),(0,l.kt)("h4",{id:"islocale"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLocale()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLocale(): ValidationChain\n")),(0,l.kt)("h4",{id:"islowercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLowercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLowercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isluhnnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLuhnNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLuhnNumber(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismagneturi"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMagnetURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMagnetURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismacaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMACAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMACAddress(options?: {\n no_separators?: boolean;\n no_colons?: boolean;\n eui?: '48' | '64';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"ismd5"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMD5()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMD5(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismimetype"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMimeType()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMimeType(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismobilephone"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMobilePhone()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMobilePhone(locale: MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: {\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of MobilePhoneLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'am-AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-OM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-PS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'be-BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bs-BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dv-MV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dz-BT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-LS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-RW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-TZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-UG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-VE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fj-FJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fo-FO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-MQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-PF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-RE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ga-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ir-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ka-GE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kl-GL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ky-KG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mg-MG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mn-MN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ms-MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'my-MM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mz-MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-AW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ne-NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-AO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-MD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tg-TJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tk-TM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uz-Uz'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"ismongoid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMongoId()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMongoId(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismultibyte"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMultibyte()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMultibyte(): ValidationChain\n")),(0,l.kt)("h4",{id:"isnumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isNumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isNumeric(options?: {\n no_symbols: boolean;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isoctal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isOctal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isOctal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispassportnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPassportNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPassportNumber(countryCode?: PassportCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PassportCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")))),(0,l.kt)("h4",{id:"isport"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPort()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPort(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispostalcode"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPostalCode()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPostalCode(locale: PostalCodeLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PostalCodeLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZM'")))),(0,l.kt)("h4",{id:"isrgbcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRgbColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRgbColor(includePercentValues?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"isrfc3339"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRFC3339()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRFC3339(): ValidationChain\n")),(0,l.kt)("h4",{id:"issemver"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSemVer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSemVer(): ValidationChain\n")),(0,l.kt)("h4",{id:"isslug"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSlug()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSlug(): ValidationChain\n")),(0,l.kt)("h4",{id:"isstrongpassword"},(0,l.kt)("inlineCode",{parentName:"h4"},"isStrongPassword()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isStrongPassword(options?: {\n minLength?: number;\n minLowercase?: number;\n minUppercase?: number;\n minNumbers?: number;\n minSymbols?: number;\n returnScore?: boolean;\n pointsPerUnique?: number;\n pointsPerRepeat?: number;\n pointsForContainingLower?: number;\n pointsForContainingUpper?: number;\n pointsForContainingNumber?: number;\n pointsForContainingSymbol?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"issurrogatepair"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSurrogatePair()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSurrogatePair(): ValidationChain\n")),(0,l.kt)("h4",{id:"istaxid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTaxID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTaxID(locale: TaxIDLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of TaxIDLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dk-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hr-HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lb-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mt-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")))),(0,l.kt)("h4",{id:"istime"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTime()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTime(options: {\n hourFormat?: 'hour24' | 'hour12';\n mode?: 'default' | 'withSeconds';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isurl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isURL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isURL(options?: {\n protocols?: URLProtocol[];\n require_tld?: boolean;\n require_protocol?: boolean;\n require_host?: boolean;\n require_port?: boolean;\n require_valid_protocol?: boolean;\n allow_underscores?: boolean;\n host_whitelist?: (string | RegExp)[];\n host_blacklist?: (string | RegExp)[];\n allow_trailing_dot?: boolean;\n allow_protocol_relative_urls?: boolean;\n disallow_auth?: boolean;\n validate_length?: boolean;\n allow_fragments?: boolean;\n allow_query_components?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isuuid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUUID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUUID(version?: UUIDVersion): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of UUIDVersion"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"1")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"2")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"3")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"4")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"5")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'2'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'3'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'all'")))),(0,l.kt)("h4",{id:"isuppercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUppercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUppercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvariablewidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVariableWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVariableWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVAT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVAT(countryCode: VATCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of VATCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'VE'")))),(0,l.kt)("h4",{id:"iswhitelisted"},(0,l.kt)("inlineCode",{parentName:"h4"},"isWhitelisted()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isWhitelisted(chars: string | readonly string[]): ValidationChain\n")),(0,l.kt)("h4",{id:"matches"},(0,l.kt)("inlineCode",{parentName:"h4"},"matches()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"matches(pattern: RegExp | string, modifiers?: string): ValidationChain\n")))}p.isMDXComponent=!0;var d=["components"],m={toc:[{value:"blacklist()",id:"blacklist",level:4},{value:"escape()",id:"escape",level:4},{value:"unescape()",id:"unescape",level:4},{value:"ltrim()",id:"ltrim",level:4},{value:"normalizeEmail()",id:"normalizeemail",level:4},{value:"rtrim()",id:"rtrim",level:4},{value:"stripLow()",id:"striplow",level:4},{value:"toBoolean()",id:"toboolean",level:4},{value:"toDate()",id:"todate",level:4},{value:"toFloat()",id:"tofloat",level:4},{value:"toInt()",id:"toint",level:4},{value:"trim()",id:"trim",level:4},{value:"whitelist()",id:"whitelist",level:4}]};function k(e){var a=e.components,n=(0,i.Z)(e,d);return(0,l.kt)("wrapper",(0,t.Z)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"blacklist"},(0,l.kt)("inlineCode",{parentName:"h4"},"blacklist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"blacklist(chars: string): ValidationChain\n")),(0,l.kt)("h4",{id:"escape"},(0,l.kt)("inlineCode",{parentName:"h4"},"escape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"escape(): ValidationChain\n")),(0,l.kt)("h4",{id:"unescape"},(0,l.kt)("inlineCode",{parentName:"h4"},"unescape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"unescape(): ValidationChain\n")),(0,l.kt)("h4",{id:"ltrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"ltrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"ltrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"normalizeemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"normalizeEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"normalizeEmail(options?: {\n all_lowercase?: boolean;\n gmail_lowercase?: boolean;\n gmail_remove_dots?: boolean;\n gmail_remove_subaddress?: boolean;\n gmail_convert_googlemaildotcom?: boolean;\n outlookdotcom_lowercase?: boolean;\n outlookdotcom_remove_subaddress?: boolean;\n yahoo_lowercase?: boolean;\n yahoo_remove_subaddress?: boolean;\n icloud_lowercase?: boolean;\n icloud_remove_subaddress?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"rtrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"rtrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"rtrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"striplow"},(0,l.kt)("inlineCode",{parentName:"h4"},"stripLow()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"stripLow(keep_new_lines?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"toboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"toBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toBoolean(strict?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"todate"},(0,l.kt)("inlineCode",{parentName:"h4"},"toDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toDate(): ValidationChain\n")),(0,l.kt)("h4",{id:"tofloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"toFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toFloat(): ValidationChain\n")),(0,l.kt)("h4",{id:"toint"},(0,l.kt)("inlineCode",{parentName:"h4"},"toInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toInt(radix?: number): ValidationChain\n")),(0,l.kt)("h4",{id:"trim"},(0,l.kt)("inlineCode",{parentName:"h4"},"trim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"trim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"whitelist"},(0,l.kt)("inlineCode",{parentName:"h4"},"whitelist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"whitelist(chars: string): ValidationChain\n")))}k.isMDXComponent=!0;var s=["components"],N={title:"ValidationChain",toc_max_heading_level:4},u="ValidationChain",c={unversionedId:"api/validation-chain",id:"version-7.0.0/api/validation-chain",title:"ValidationChain",description:"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine",source:"@site/versioned_docs/version-7.0.0/api/validation-chain.md",sourceDirName:"api",slug:"/api/validation-chain",permalink:"/docs/api/validation-chain",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/api/validation-chain.md",tags:[],version:"7.0.0",frontMatter:{title:"ValidationChain",toc_max_heading_level:4},sidebar:"api",previous:{title:"oneOf",permalink:"/docs/api/one-of"},next:{title:"ExpressValidator",permalink:"/docs/api/express-validator"}},C={},h=[{value:"Built-in validators",id:"built-in-validators",level:2},{value:".custom()",id:"custom",level:3},{value:".exists()",id:"exists",level:3},{value:".isArray()",id:"isarray",level:3},{value:".isObject()",id:"isobject",level:3},{value:".isString()",id:"isstring",level:3},{value:".notEmpty()",id:"notempty",level:3},{value:"Standard validators",id:"standard-validators",level:3},{value:"Built-in sanitizers",id:"built-in-sanitizers",level:2},{value:".customSanitizer()",id:"customsanitizer",level:3},{value:".default()",id:"default",level:3},{value:".replace()",id:"replace",level:3},{value:".toArray()",id:"toarray",level:3},{value:".toLowerCase()",id:"tolowercase",level:3},{value:".toUpperCase()",id:"touppercase",level:3},{value:"Standard sanitizers",id:"standard-sanitizers",level:3},{value:"Modifiers",id:"modifiers",level:2},{value:".bail()",id:"bail",level:3},{value:".if()",id:"if",level:3},{value:".not()",id:"not",level:3},{value:".optional()",id:"optional",level:3},{value:".withMessage()",id:"withmessage",level:3}],g={toc:h};function v(e){var a=e.components,n=(0,i.Z)(e,s);return(0,l.kt)("wrapper",(0,t.Z)({},g,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"validationchain"},(0,l.kt)("inlineCode",{parentName:"h1"},"ValidationChain")),(0,l.kt)("p",null,"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine\ntune the behaviour of the validation for a certain field or fields."),(0,l.kt)("p",null,"Validation chains are created by the ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/check"},(0,l.kt)("inlineCode",{parentName:"a"},"check()")," functions"),", and they can be used in a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"as express.js route handlers, which will run the validation automatically;"),(0,l.kt)("li",{parentName:"ul"},"as parameter of some of express-validator's other functions, like ",(0,l.kt)("inlineCode",{parentName:"li"},"oneOf()")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"checkExact()"),";"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"/docs/guides/manually-running"},"standalone, where you have full control over when the validation runs and how"),".")),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If you're writing a function that accepts a ",(0,l.kt)("inlineCode",{parentName:"p"},"ValidationChain"),", the TypeScript type can be imported using"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { ValidationChain } from 'express-validator';\n"))),(0,l.kt)("h2",{id:"built-in-validators"},"Built-in validators"),(0,l.kt)("h3",{id:"custom"},(0,l.kt)("inlineCode",{parentName:"h3"},".custom()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"custom(validator: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom validator function to the chain."),(0,l.kt)("p",null,"The field value will be valid if:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The custom validator returns truthy; or"),(0,l.kt)("li",{parentName:"ul"},"The custom validator returns a promise that resolves.")),(0,l.kt)("p",null,"If the custom validator returns falsy, a promise that rejects, or if the function throws,\nthen the value will be considered invalid."),(0,l.kt)("p",null,"A common use case for ",(0,l.kt)("inlineCode",{parentName:"p"},".custom()")," is to verify that an e-mail address doesn't already exists.\nIf it does, return an error:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/signup', body('email').custom(async value => {\n const existingUser = await Users.findUserByEmail(value);\n if (existingUser) {\n throw new Error('E-mail already in use');\n }\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"exists"},(0,l.kt)("inlineCode",{parentName:"h3"},".exists()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"exists(options?: {\n values?: 'undefined' | 'null' | 'falsy',\n checkNull?: boolean,\n checkFalsy?: boolean\n}): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check if the field exists."),(0,l.kt)("p",null,"Which values are considered existent depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),". By default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.checkNull")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),", respectively."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"Using ",(0,l.kt)("inlineCode",{parentName:"p"},".exists()")," is only necessary if you aren't adding any other validator or sanitizer.")),(0,l.kt)("h3",{id:"isarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".isArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isArray(options?: { min?: number; max?: number }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an array.\nThis is analogous to ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray"},"the JavaScript function ",(0,l.kt)("inlineCode",{parentName:"a"},"Array.isArray(value)")),"."),(0,l.kt)("p",null,"You can also check that the array's length is greater than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.min")," and/or\nthat it's less than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.max"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// Verifies that the friends list is an array\nbody('friends').isArray();\n\n// Verifies that ingredients is an array with length >= 0\nbody('ingredients').isArray({ min: 0 });\n\n// Verifies that team_members is an array with length >= 0 and <= 10\ncheck('team_members').isArray({ min: 0, max: 10 });\n")),(0,l.kt)("h3",{id:"isobject"},(0,l.kt)("inlineCode",{parentName:"h3"},".isObject()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isObject(options?: { strict?: boolean }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an object.\nFor example, ",(0,l.kt)("inlineCode",{parentName:"p"},"{}"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"{ foo: 'bar' }")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"new MyCustomClass()")," would all pass this validator."),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"strict")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then this validator works analogous to\n",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'object'")," in pure JavaScript"),",\nwhere both arrays and the ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," value are considered objects."),(0,l.kt)("h3",{id:"isstring"},(0,l.kt)("inlineCode",{parentName:"h3"},".isString()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isString(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string.\nThis is analogous to a ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'string'")," in pure JavaScript"),"."),(0,l.kt)("h3",{id:"notempty"},(0,l.kt)("inlineCode",{parentName:"h3"},".notEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"notEmpty(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string that's not empty.\nThis is analogous to ",(0,l.kt)("inlineCode",{parentName:"p"},".not().isEmpty()"),"."),(0,l.kt)("h3",{id:"standard-validators"},"Standard validators"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard validators ",(0,l.kt)("a",{parentName:"p",href:"/docs/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(p,{mdxType:"ValidatorValidators"}),(0,l.kt)("h2",{id:"built-in-sanitizers"},"Built-in sanitizers"),(0,l.kt)("h3",{id:"customsanitizer"},(0,l.kt)("inlineCode",{parentName:"h3"},".customSanitizer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"customSanitizer(sanitizer: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom sanitizer function to the chain.\nThe value returned by the function will become the new value of the field."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/object/:id', param('id').customSanitizer((value, { req }) => {\n // In this app, users have MongoDB style object IDs, everything else, numbers\n return req.query.type === 'user' ? ObjectId(value) : Number(value);\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"default"},(0,l.kt)("inlineCode",{parentName:"h3"},".default()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"default(defaultValue: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field if it's either an empty string, ",(0,l.kt)("inlineCode",{parentName:"p"},"null"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),", or ",(0,l.kt)("inlineCode",{parentName:"p"},"NaN"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').default('foo'), (req, res, next) => {\n // 'bar' => 'bar'\n // '' => 'foo'\n // undefined => 'foo'\n // null => 'foo'\n // NaN => 'foo'\n});\n")),(0,l.kt)("h3",{id:"replace"},(0,l.kt)("inlineCode",{parentName:"h3"},".replace()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"replace(valuesFrom: any[], valueTo: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field with ",(0,l.kt)("inlineCode",{parentName:"p"},"valueTo")," whenever the current value is in ",(0,l.kt)("inlineCode",{parentName:"p"},"valuesFrom"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').replace(['bar', 'BAR'], 'foo'), (req, res, next) => {\n // 'bar_' => 'bar_'\n // 'bar' => 'foo'\n // 'BAR' => 'foo'\n console.log(req.body.username);\n});\n")),(0,l.kt)("h3",{id:"toarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".toArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toArray(): ValidationChain\n")),(0,l.kt)("p",null,"Transforms the value to an array. If it already is one, nothing is done. ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined")," values become empty arrays."),(0,l.kt)("h3",{id:"tolowercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toLowerCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toLowerCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to lower case. If not a string, does nothing."),(0,l.kt)("h3",{id:"touppercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toUpperCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toUpperCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to upper case. If not a string, does nothing."),(0,l.kt)("h3",{id:"standard-sanitizers"},"Standard sanitizers"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard sanitizers ",(0,l.kt)("a",{parentName:"p",href:"/docs/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(k,{mdxType:"ValidatorSanitizers"}),(0,l.kt)("h2",{id:"modifiers"},"Modifiers"),(0,l.kt)("h3",{id:"bail"},(0,l.kt)("inlineCode",{parentName:"h3"},".bail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"bail(options?: { level: 'chain' | 'request' }): ValidationChain\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Parameters:")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Name"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"options.level")),(0,l.kt)("td",{parentName:"tr",align:null},"The level at which the validation chain should be stopped. Defaults to ",(0,l.kt)("inlineCode",{parentName:"td"},"chain"),".")))),(0,l.kt)("p",null,"Stops running the validation chain if any of the previous validators failed."),(0,l.kt)("p",null,"This is useful to prevent a custom validator that touches a database or external API from running\nwhen you know it will fail."),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},".bail()")," can be used multiple times in the same validation chain if desired:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('username')\n .isEmail()\n // If not an email, stop here\n .bail()\n .custom(checkDenylistDomain)\n // If domain is not allowed, don't go check if it already exists\n .bail()\n .custom(checkEmailExists);\n")),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"level")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"request"),", then also no further validation chains will run on the current request.\nFor example:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.get(\n '/search',\n query('query').notEmpty().bail({ level: 'request' }),\n // If `query` is empty, then the following validation chains won't run:\n query('query_type').isIn(['user', 'posts']),\n query('num_results').isInt(),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Functions such as ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,l.kt)("inlineCode",{parentName:"a"},"oneOf()"))," and ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/check-exact"},(0,l.kt)("inlineCode",{parentName:"a"},"checkExact()"))," can become slower\nwhen using request-level bail, since validation chains that would normally run in parallel need to\nrun in sequence.")),(0,l.kt)("h3",{id:"if"},(0,l.kt)("inlineCode",{parentName:"h3"},".if()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"if(condition: CustomValidator | ContextRunner): ValidationChain\n")),(0,l.kt)("p",null,"Adds a condition on whether the validation chain should continue running on a field or not."),(0,l.kt)("p",null,"The condition may be either a ",(0,l.kt)("a",{parentName:"p",href:"#custom"},"custom validator")," or a ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/misc#contextrunner"},(0,l.kt)("inlineCode",{parentName:"a"},"ContextRunner")," instance"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('newPassword')\n // Only validate if the old password has been provided\n .if((value, { req }) => req.body.oldPassword)\n // Or, use a validation chain instead\n .if(body('oldPassword').notEmpty())\n // The length of the new password will only be checked if `oldPassword` is provided.\n .isLength({ min: 6 });\n")),(0,l.kt)("h3",{id:"not"},(0,l.kt)("inlineCode",{parentName:"h3"},".not()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"not(): ValidationChain\n")),(0,l.kt)("p",null,"Negates the result of the next validator in the chain."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"check('weekday').not().isIn(['sunday', 'saturday']);\n")),(0,l.kt)("h3",{id:"optional"},(0,l.kt)("inlineCode",{parentName:"h3"},".optional()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"optional(options?: boolean | {\n values?: 'undefined' | 'null' | 'falsy',\n nullable?: boolean,\n checkFalsy?: boolean,\n}): ValidationChain\n")),(0,l.kt)("p",null,"Marks the current validation chain as optional.\nAn optional field skips validation depending on its value, instead of failing it."),(0,l.kt)("p",null,"Which values are considered optional depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),".\nBy default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.nullable")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),"."),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"options")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then the field won't be optional."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Unlike validators and sanitizers, ",(0,l.kt)("inlineCode",{parentName:"p"},".optional()")," is not positional: it'll affect how values are interpreted,\nno matter where it happens in the chain."),(0,l.kt)("p",{parentName:"admonition"},"For example, there are no differences between this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').isLength({ max: 100 }).isJSON().optional().\n")),(0,l.kt)("p",{parentName:"admonition"},"and this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').optional().isLength({ max: 100 }).isJSON().\n"))),(0,l.kt)("h3",{id:"withmessage"},(0,l.kt)("inlineCode",{parentName:"h3"},".withMessage()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"withMessage(message: any): ValidationChain\n")),(0,l.kt)("p",null,"Sets the error message used by the previous validator."))}v.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2796],{5318:(e,a,n)=>{n.d(a,{Zo:()=>m,kt:()=>u});var t=n(7378);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),d=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},m=function(e){var a=d(e.components);return t.createElement(p.Provider,{value:a},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},N=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),k=d(n),N=i,u=k["".concat(p,".").concat(N)]||k[N]||s[N]||l;return n?t.createElement(u,r(r({ref:a},m),{},{components:n})):t.createElement(u,r({ref:a},m))}));function u(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=N;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[k]="string"==typeof e?e:i,r[1]=o;for(var d=2;d{n.r(a),n.d(a,{assets:()=>C,contentTitle:()=>u,default:()=>v,frontMatter:()=>N,metadata:()=>c,toc:()=>h});var t=n(5773),i=n(808),l=(n(7378),n(5318)),r=["components"],o={toc:[{value:"contains()",id:"contains",level:4},{value:"equals()",id:"equals",level:4},{value:"isAfter()",id:"isafter",level:4},{value:"isAlpha()",id:"isalpha",level:4},{value:"isAlphanumeric()",id:"isalphanumeric",level:4},{value:"isAscii()",id:"isascii",level:4},{value:"isBase32()",id:"isbase32",level:4},{value:"isBase58()",id:"isbase58",level:4},{value:"isBase64()",id:"isbase64",level:4},{value:"isBefore()",id:"isbefore",level:4},{value:"isBIC()",id:"isbic",level:4},{value:"isBoolean()",id:"isboolean",level:4},{value:"isBtcAddress()",id:"isbtcaddress",level:4},{value:"isByteLength()",id:"isbytelength",level:4},{value:"isCreditCard()",id:"iscreditcard",level:4},{value:"isCurrency()",id:"iscurrency",level:4},{value:"isDataURI()",id:"isdatauri",level:4},{value:"isDate()",id:"isdate",level:4},{value:"isDecimal()",id:"isdecimal",level:4},{value:"isDivisibleBy()",id:"isdivisibleby",level:4},{value:"isEAN()",id:"isean",level:4},{value:"isEmail()",id:"isemail",level:4},{value:"isEmpty()",id:"isempty",level:4},{value:"isEthereumAddress()",id:"isethereumaddress",level:4},{value:"isFQDN()",id:"isfqdn",level:4},{value:"isFloat()",id:"isfloat",level:4},{value:"isFullWidth()",id:"isfullwidth",level:4},{value:"isHalfWidth()",id:"ishalfwidth",level:4},{value:"isHash()",id:"ishash",level:4},{value:"isHexColor()",id:"ishexcolor",level:4},{value:"isHexadecimal()",id:"ishexadecimal",level:4},{value:"isHSL()",id:"ishsl",level:4},{value:"isIBAN()",id:"isiban",level:4},{value:"isIdentityCard()",id:"isidentitycard",level:4},{value:"isIMEI()",id:"isimei",level:4},{value:"isIP()",id:"isip",level:4},{value:"isIPRange()",id:"isiprange",level:4},{value:"isISBN()",id:"isisbn",level:4},{value:"isISSN()",id:"isissn",level:4},{value:"isISIN()",id:"isisin",level:4},{value:"isISO6391()",id:"isiso6391",level:4},{value:"isISO8601()",id:"isiso8601",level:4},{value:"isISO31661Alpha2()",id:"isiso31661alpha2",level:4},{value:"isISO31661Alpha3()",id:"isiso31661alpha3",level:4},{value:"isISO4217()",id:"isiso4217",level:4},{value:"isISRC()",id:"isisrc",level:4},{value:"isIn()",id:"isin",level:4},{value:"isInt()",id:"isint",level:4},{value:"isJSON()",id:"isjson",level:4},{value:"isJWT()",id:"isjwt",level:4},{value:"isLatLong()",id:"islatlong",level:4},{value:"isLength()",id:"islength",level:4},{value:"isLicensePlate()",id:"islicenseplate",level:4},{value:"isLocale()",id:"islocale",level:4},{value:"isLowercase()",id:"islowercase",level:4},{value:"isLuhnNumber()",id:"isluhnnumber",level:4},{value:"isMagnetURI()",id:"ismagneturi",level:4},{value:"isMACAddress()",id:"ismacaddress",level:4},{value:"isMD5()",id:"ismd5",level:4},{value:"isMimeType()",id:"ismimetype",level:4},{value:"isMobilePhone()",id:"ismobilephone",level:4},{value:"isMongoId()",id:"ismongoid",level:4},{value:"isMultibyte()",id:"ismultibyte",level:4},{value:"isNumeric()",id:"isnumeric",level:4},{value:"isOctal()",id:"isoctal",level:4},{value:"isPassportNumber()",id:"ispassportnumber",level:4},{value:"isPort()",id:"isport",level:4},{value:"isPostalCode()",id:"ispostalcode",level:4},{value:"isRgbColor()",id:"isrgbcolor",level:4},{value:"isRFC3339()",id:"isrfc3339",level:4},{value:"isSemVer()",id:"issemver",level:4},{value:"isSlug()",id:"isslug",level:4},{value:"isStrongPassword()",id:"isstrongpassword",level:4},{value:"isSurrogatePair()",id:"issurrogatepair",level:4},{value:"isTaxID()",id:"istaxid",level:4},{value:"isTime()",id:"istime",level:4},{value:"isURL()",id:"isurl",level:4},{value:"isUUID()",id:"isuuid",level:4},{value:"isUppercase()",id:"isuppercase",level:4},{value:"isVariableWidth()",id:"isvariablewidth",level:4},{value:"isVAT()",id:"isvat",level:4},{value:"isWhitelisted()",id:"iswhitelisted",level:4},{value:"matches()",id:"matches",level:4}]};function p(e){var a=e.components,n=(0,i.Z)(e,r);return(0,l.kt)("wrapper",(0,t.Z)({},o,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"contains"},(0,l.kt)("inlineCode",{parentName:"h4"},"contains()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"contains(elem: any, options?: {\n ignoreCase?: boolean;\n minOccurrences?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"equals"},(0,l.kt)("inlineCode",{parentName:"h4"},"equals()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"equals(comparison: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isafter"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAfter()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAfter(dateOrOptions?: string | {\n comparisonDate?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isalpha"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlpha()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlpha(locale?: AlphaLocale, options?: {\n ignore?: string | string[] | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphaLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isalphanumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlphanumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlphanumeric(locale?: AlphanumericLocale, options?: {\n ignore?: string | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphanumericLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isascii"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAscii()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAscii(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase32"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase32()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase32(options?: {\n crockford?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase58"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase58()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase58(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase64"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase64()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase64(options?: {\n urlSafe?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbefore"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBefore()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBefore(date?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isbic"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBIC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBIC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBoolean(options?: {\n strict?: boolean;\n loose?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbtcaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBtcAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBtcAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbytelength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isByteLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isByteLength(options: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscreditcard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCreditCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCreditCard(options?: {\n provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscurrency"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCurrency()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCurrency(options?: {\n symbol?: string;\n require_symbol?: boolean;\n allow_space_after_symbol?: boolean;\n symbol_after_digits?: boolean;\n allow_negatives?: boolean;\n parens_for_negatives?: boolean;\n negative_sign_before_digits?: boolean;\n negative_sign_after_digits?: boolean;\n allow_negative_sign_placeholder?: boolean;\n thousands_separator?: string;\n decimal_separator?: string;\n allow_decimal?: boolean;\n require_decimal?: boolean;\n digits_after_decimal?: number[];\n allow_space_after_digits?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdatauri"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDataURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDataURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"isdate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDate(options?: {\n format?: string;\n delimiters?: string[];\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDecimal(options?: {\n decimal_digits?: string;\n force_decimal?: boolean;\n locale?: AlphanumericLocale;\n blacklisted_chars?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdivisibleby"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDivisibleBy()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDivisibleBy(number: number): ValidationChain\n")),(0,l.kt)("h4",{id:"isean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmail(options?: {\n allow_display_name?: boolean;\n allow_utf8_local_part?: boolean;\n require_tld?: boolean;\n ignore_max_length?: boolean;\n allow_ip_domain?: boolean;\n domain_specific_validation?: boolean;\n blacklisted_chars?: string;\n host_blacklist?: string[];\n host_whitelist?: string[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isempty"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(options?: {\n ignore_whitespace: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isethereumaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEthereumAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEthereumAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isfqdn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFQDN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFQDN(options?: {\n require_tld?: boolean;\n allow_underscores?: boolean;\n allow_trailing_dot?: boolean;\n allow_numeric_tld?: boolean;\n allow_wildcard?: boolean;\n ignore_max_length?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFloat(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfullwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFullWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFullWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishalfwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHalfWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHalfWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishash"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHash()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHash(algorithm: HashAlgorithm): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of HashAlgorithm"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha256'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha384'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha512'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger192'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32b'")))),(0,l.kt)("h4",{id:"ishexcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexColor(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishexadecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexadecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexadecimal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishsl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHSL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHSL(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiban"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIBAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIBAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isidentitycard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIdentityCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIdentityCard(locale?: IdentityCardLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IdentityCardLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hk-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"isimei"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIMEI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIMEI(options?: {\n allow_hyphens?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isip"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIP()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIP(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isiprange"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIPRange()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIPRange(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isisbn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISBN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISBN(versionOrOptions?: number | {\n version?: '10' | '13';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isissn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISSN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISSN(options?: {\n case_sensitive?: boolean;\n require_hyphen?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isisin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISIN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISIN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso6391"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO6391()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO6391(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso8601"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO8601()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO8601(options?: {\n strict?: boolean;\n strictSeparator?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha2"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha2()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha2(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha3"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha3()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha3(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso4217"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO4217()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO4217(): ValidationChain\n")),(0,l.kt)("h4",{id:"isisrc"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISRC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISRC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIn()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIn(values: readonly any[]): ValidationChain\n")),(0,l.kt)("h4",{id:"isint"},(0,l.kt)("inlineCode",{parentName:"h4"},"isInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isInt(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n allow_leading_zeroes?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjson"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJSON()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJSON(options?: {\n allow_primitives?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjwt"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJWT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJWT(): ValidationChain\n")),(0,l.kt)("h4",{id:"islatlong"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLatLong()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLatLong(options?: {\n checkDMS?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLength(options: {\n min?: number;\n max?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islicenseplate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLicensePlate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLicensePlate(locale: IsLicensePlateLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IsLicensePlateLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")))),(0,l.kt)("h4",{id:"islocale"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLocale()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLocale(): ValidationChain\n")),(0,l.kt)("h4",{id:"islowercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLowercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLowercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isluhnnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLuhnNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLuhnNumber(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismagneturi"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMagnetURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMagnetURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismacaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMACAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMACAddress(options?: {\n no_separators?: boolean;\n no_colons?: boolean;\n eui?: '48' | '64';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"ismd5"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMD5()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMD5(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismimetype"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMimeType()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMimeType(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismobilephone"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMobilePhone()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMobilePhone(locale: MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: {\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of MobilePhoneLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'am-AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-OM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-PS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'be-BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bs-BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dv-MV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dz-BT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-LS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-RW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-TZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-UG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-VE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fj-FJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fo-FO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-MQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-PF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-RE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ga-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ir-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ka-GE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kl-GL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ky-KG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mg-MG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mn-MN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ms-MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'my-MM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mz-MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-AW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ne-NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-AO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-MD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tg-TJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tk-TM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uz-Uz'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"ismongoid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMongoId()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMongoId(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismultibyte"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMultibyte()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMultibyte(): ValidationChain\n")),(0,l.kt)("h4",{id:"isnumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isNumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isNumeric(options?: {\n no_symbols: boolean;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isoctal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isOctal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isOctal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispassportnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPassportNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPassportNumber(countryCode?: PassportCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PassportCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")))),(0,l.kt)("h4",{id:"isport"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPort()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPort(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispostalcode"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPostalCode()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPostalCode(locale: PostalCodeLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PostalCodeLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZM'")))),(0,l.kt)("h4",{id:"isrgbcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRgbColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRgbColor(includePercentValues?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"isrfc3339"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRFC3339()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRFC3339(): ValidationChain\n")),(0,l.kt)("h4",{id:"issemver"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSemVer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSemVer(): ValidationChain\n")),(0,l.kt)("h4",{id:"isslug"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSlug()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSlug(): ValidationChain\n")),(0,l.kt)("h4",{id:"isstrongpassword"},(0,l.kt)("inlineCode",{parentName:"h4"},"isStrongPassword()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isStrongPassword(options?: {\n minLength?: number;\n minLowercase?: number;\n minUppercase?: number;\n minNumbers?: number;\n minSymbols?: number;\n returnScore?: boolean;\n pointsPerUnique?: number;\n pointsPerRepeat?: number;\n pointsForContainingLower?: number;\n pointsForContainingUpper?: number;\n pointsForContainingNumber?: number;\n pointsForContainingSymbol?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"issurrogatepair"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSurrogatePair()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSurrogatePair(): ValidationChain\n")),(0,l.kt)("h4",{id:"istaxid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTaxID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTaxID(locale: TaxIDLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of TaxIDLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dk-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hr-HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lb-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mt-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")))),(0,l.kt)("h4",{id:"istime"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTime()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTime(options: {\n hourFormat?: 'hour24' | 'hour12';\n mode?: 'default' | 'withSeconds';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isurl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isURL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isURL(options?: {\n protocols?: URLProtocol[];\n require_tld?: boolean;\n require_protocol?: boolean;\n require_host?: boolean;\n require_port?: boolean;\n require_valid_protocol?: boolean;\n allow_underscores?: boolean;\n host_whitelist?: (string | RegExp)[];\n host_blacklist?: (string | RegExp)[];\n allow_trailing_dot?: boolean;\n allow_protocol_relative_urls?: boolean;\n disallow_auth?: boolean;\n validate_length?: boolean;\n allow_fragments?: boolean;\n allow_query_components?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isuuid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUUID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUUID(version?: UUIDVersion): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of UUIDVersion"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"1")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"2")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"3")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"4")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"5")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'2'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'3'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'all'")))),(0,l.kt)("h4",{id:"isuppercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUppercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUppercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvariablewidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVariableWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVariableWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVAT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVAT(countryCode: VATCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of VATCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'VE'")))),(0,l.kt)("h4",{id:"iswhitelisted"},(0,l.kt)("inlineCode",{parentName:"h4"},"isWhitelisted()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isWhitelisted(chars: string | readonly string[]): ValidationChain\n")),(0,l.kt)("h4",{id:"matches"},(0,l.kt)("inlineCode",{parentName:"h4"},"matches()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"matches(pattern: RegExp | string, modifiers?: string): ValidationChain\n")))}p.isMDXComponent=!0;var d=["components"],m={toc:[{value:"blacklist()",id:"blacklist",level:4},{value:"escape()",id:"escape",level:4},{value:"unescape()",id:"unescape",level:4},{value:"ltrim()",id:"ltrim",level:4},{value:"normalizeEmail()",id:"normalizeemail",level:4},{value:"rtrim()",id:"rtrim",level:4},{value:"stripLow()",id:"striplow",level:4},{value:"toBoolean()",id:"toboolean",level:4},{value:"toDate()",id:"todate",level:4},{value:"toFloat()",id:"tofloat",level:4},{value:"toInt()",id:"toint",level:4},{value:"trim()",id:"trim",level:4},{value:"whitelist()",id:"whitelist",level:4}]};function k(e){var a=e.components,n=(0,i.Z)(e,d);return(0,l.kt)("wrapper",(0,t.Z)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"blacklist"},(0,l.kt)("inlineCode",{parentName:"h4"},"blacklist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"blacklist(chars: string): ValidationChain\n")),(0,l.kt)("h4",{id:"escape"},(0,l.kt)("inlineCode",{parentName:"h4"},"escape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"escape(): ValidationChain\n")),(0,l.kt)("h4",{id:"unescape"},(0,l.kt)("inlineCode",{parentName:"h4"},"unescape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"unescape(): ValidationChain\n")),(0,l.kt)("h4",{id:"ltrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"ltrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"ltrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"normalizeemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"normalizeEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"normalizeEmail(options?: {\n all_lowercase?: boolean;\n gmail_lowercase?: boolean;\n gmail_remove_dots?: boolean;\n gmail_remove_subaddress?: boolean;\n gmail_convert_googlemaildotcom?: boolean;\n outlookdotcom_lowercase?: boolean;\n outlookdotcom_remove_subaddress?: boolean;\n yahoo_lowercase?: boolean;\n yahoo_remove_subaddress?: boolean;\n icloud_lowercase?: boolean;\n icloud_remove_subaddress?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"rtrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"rtrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"rtrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"striplow"},(0,l.kt)("inlineCode",{parentName:"h4"},"stripLow()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"stripLow(keep_new_lines?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"toboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"toBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toBoolean(strict?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"todate"},(0,l.kt)("inlineCode",{parentName:"h4"},"toDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toDate(): ValidationChain\n")),(0,l.kt)("h4",{id:"tofloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"toFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toFloat(): ValidationChain\n")),(0,l.kt)("h4",{id:"toint"},(0,l.kt)("inlineCode",{parentName:"h4"},"toInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toInt(radix?: number): ValidationChain\n")),(0,l.kt)("h4",{id:"trim"},(0,l.kt)("inlineCode",{parentName:"h4"},"trim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"trim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"whitelist"},(0,l.kt)("inlineCode",{parentName:"h4"},"whitelist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"whitelist(chars: string): ValidationChain\n")))}k.isMDXComponent=!0;var s=["components"],N={title:"ValidationChain",toc_max_heading_level:4},u="ValidationChain",c={unversionedId:"api/validation-chain",id:"version-7.0.0/api/validation-chain",title:"ValidationChain",description:"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine",source:"@site/versioned_docs/version-7.0.0/api/validation-chain.md",sourceDirName:"api",slug:"/api/validation-chain",permalink:"/docs/api/validation-chain",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/api/validation-chain.md",tags:[],version:"7.0.0",frontMatter:{title:"ValidationChain",toc_max_heading_level:4},sidebar:"api",previous:{title:"oneOf",permalink:"/docs/api/one-of"},next:{title:"ExpressValidator",permalink:"/docs/api/express-validator"}},C={},h=[{value:"Built-in validators",id:"built-in-validators",level:2},{value:".custom()",id:"custom",level:3},{value:".exists()",id:"exists",level:3},{value:".isArray()",id:"isarray",level:3},{value:".isObject()",id:"isobject",level:3},{value:".isString()",id:"isstring",level:3},{value:".notEmpty()",id:"notempty",level:3},{value:"Standard validators",id:"standard-validators",level:3},{value:"Built-in sanitizers",id:"built-in-sanitizers",level:2},{value:".customSanitizer()",id:"customsanitizer",level:3},{value:".default()",id:"default",level:3},{value:".replace()",id:"replace",level:3},{value:".toArray()",id:"toarray",level:3},{value:".toLowerCase()",id:"tolowercase",level:3},{value:".toUpperCase()",id:"touppercase",level:3},{value:"Standard sanitizers",id:"standard-sanitizers",level:3},{value:"Modifiers",id:"modifiers",level:2},{value:".bail()",id:"bail",level:3},{value:".if()",id:"if",level:3},{value:".not()",id:"not",level:3},{value:".optional()",id:"optional",level:3},{value:".withMessage()",id:"withmessage",level:3}],g={toc:h};function v(e){var a=e.components,n=(0,i.Z)(e,s);return(0,l.kt)("wrapper",(0,t.Z)({},g,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"validationchain"},(0,l.kt)("inlineCode",{parentName:"h1"},"ValidationChain")),(0,l.kt)("p",null,"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine\ntune the behaviour of the validation for a certain field or fields."),(0,l.kt)("p",null,"Validation chains are created by the ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/check"},(0,l.kt)("inlineCode",{parentName:"a"},"check()")," functions"),", and they can be used in a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"as express.js route handlers, which will run the validation automatically;"),(0,l.kt)("li",{parentName:"ul"},"as parameter of some of express-validator's other functions, like ",(0,l.kt)("inlineCode",{parentName:"li"},"oneOf()")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"checkExact()"),";"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"/docs/guides/manually-running"},"standalone, where you have full control over when the validation runs and how"),".")),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If you're writing a function that accepts a ",(0,l.kt)("inlineCode",{parentName:"p"},"ValidationChain"),", the TypeScript type can be imported using"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { ValidationChain } from 'express-validator';\n"))),(0,l.kt)("h2",{id:"built-in-validators"},"Built-in validators"),(0,l.kt)("h3",{id:"custom"},(0,l.kt)("inlineCode",{parentName:"h3"},".custom()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"custom(validator: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom validator function to the chain."),(0,l.kt)("p",null,"The field value will be valid if:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The custom validator returns truthy; or"),(0,l.kt)("li",{parentName:"ul"},"The custom validator returns a promise that resolves.")),(0,l.kt)("p",null,"If the custom validator returns falsy, a promise that rejects, or if the function throws,\nthen the value will be considered invalid."),(0,l.kt)("p",null,"A common use case for ",(0,l.kt)("inlineCode",{parentName:"p"},".custom()")," is to verify that an e-mail address doesn't already exists.\nIf it does, return an error:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/signup',\n body('email').custom(async value => {\n const existingUser = await Users.findUserByEmail(value);\n if (existingUser) {\n throw new Error('E-mail already in use');\n }\n }),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("h3",{id:"exists"},(0,l.kt)("inlineCode",{parentName:"h3"},".exists()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"exists(options?: {\n values?: 'undefined' | 'null' | 'falsy',\n checkNull?: boolean,\n checkFalsy?: boolean\n}): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check if the field exists."),(0,l.kt)("p",null,"Which values are considered existent depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),". By default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.checkNull")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),", respectively."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"Using ",(0,l.kt)("inlineCode",{parentName:"p"},".exists()")," is only necessary if you aren't adding any other validator or sanitizer.")),(0,l.kt)("h3",{id:"isarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".isArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isArray(options?: { min?: number; max?: number }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an array.\nThis is analogous to ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray"},"the JavaScript function ",(0,l.kt)("inlineCode",{parentName:"a"},"Array.isArray(value)")),"."),(0,l.kt)("p",null,"You can also check that the array's length is greater than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.min")," and/or\nthat it's less than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.max"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// Verifies that the friends list is an array\nbody('friends').isArray();\n\n// Verifies that ingredients is an array with length >= 0\nbody('ingredients').isArray({ min: 0 });\n\n// Verifies that team_members is an array with length >= 0 and <= 10\ncheck('team_members').isArray({ min: 0, max: 10 });\n")),(0,l.kt)("h3",{id:"isobject"},(0,l.kt)("inlineCode",{parentName:"h3"},".isObject()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isObject(options?: { strict?: boolean }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an object.\nFor example, ",(0,l.kt)("inlineCode",{parentName:"p"},"{}"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"{ foo: 'bar' }")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"new MyCustomClass()")," would all pass this validator."),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"strict")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then this validator works analogous to\n",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'object'")," in pure JavaScript"),",\nwhere both arrays and the ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," value are considered objects."),(0,l.kt)("h3",{id:"isstring"},(0,l.kt)("inlineCode",{parentName:"h3"},".isString()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isString(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string.\nThis is analogous to a ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'string'")," in pure JavaScript"),"."),(0,l.kt)("h3",{id:"notempty"},(0,l.kt)("inlineCode",{parentName:"h3"},".notEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"notEmpty(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string that's not empty.\nThis is analogous to ",(0,l.kt)("inlineCode",{parentName:"p"},".not().isEmpty()"),"."),(0,l.kt)("h3",{id:"standard-validators"},"Standard validators"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard validators ",(0,l.kt)("a",{parentName:"p",href:"/docs/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(p,{mdxType:"ValidatorValidators"}),(0,l.kt)("h2",{id:"built-in-sanitizers"},"Built-in sanitizers"),(0,l.kt)("h3",{id:"customsanitizer"},(0,l.kt)("inlineCode",{parentName:"h3"},".customSanitizer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"customSanitizer(sanitizer: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom sanitizer function to the chain.\nThe value returned by the function will become the new value of the field."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/object/:id', param('id').customSanitizer((value, { req }) => {\n // In this app, users have MongoDB style object IDs, everything else, numbers\n return req.query.type === 'user' ? ObjectId(value) : Number(value);\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"default"},(0,l.kt)("inlineCode",{parentName:"h3"},".default()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"default(defaultValue: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field if it's either an empty string, ",(0,l.kt)("inlineCode",{parentName:"p"},"null"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),", or ",(0,l.kt)("inlineCode",{parentName:"p"},"NaN"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').default('foo'), (req, res, next) => {\n // 'bar' => 'bar'\n // '' => 'foo'\n // undefined => 'foo'\n // null => 'foo'\n // NaN => 'foo'\n});\n")),(0,l.kt)("h3",{id:"replace"},(0,l.kt)("inlineCode",{parentName:"h3"},".replace()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"replace(valuesFrom: any[], valueTo: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field with ",(0,l.kt)("inlineCode",{parentName:"p"},"valueTo")," whenever the current value is in ",(0,l.kt)("inlineCode",{parentName:"p"},"valuesFrom"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').replace(['bar', 'BAR'], 'foo'), (req, res, next) => {\n // 'bar_' => 'bar_'\n // 'bar' => 'foo'\n // 'BAR' => 'foo'\n console.log(req.body.username);\n});\n")),(0,l.kt)("h3",{id:"toarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".toArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toArray(): ValidationChain\n")),(0,l.kt)("p",null,"Transforms the value to an array. If it already is one, nothing is done. ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined")," values become empty arrays."),(0,l.kt)("h3",{id:"tolowercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toLowerCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toLowerCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to lower case. If not a string, does nothing."),(0,l.kt)("h3",{id:"touppercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toUpperCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toUpperCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to upper case. If not a string, does nothing."),(0,l.kt)("h3",{id:"standard-sanitizers"},"Standard sanitizers"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard sanitizers ",(0,l.kt)("a",{parentName:"p",href:"/docs/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(k,{mdxType:"ValidatorSanitizers"}),(0,l.kt)("h2",{id:"modifiers"},"Modifiers"),(0,l.kt)("h3",{id:"bail"},(0,l.kt)("inlineCode",{parentName:"h3"},".bail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"bail(options?: { level: 'chain' | 'request' }): ValidationChain\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Parameters:")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Name"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"options.level")),(0,l.kt)("td",{parentName:"tr",align:null},"The level at which the validation chain should be stopped. Defaults to ",(0,l.kt)("inlineCode",{parentName:"td"},"chain"),".")))),(0,l.kt)("p",null,"Stops running the validation chain if any of the previous validators failed."),(0,l.kt)("p",null,"This is useful to prevent a custom validator that touches a database or external API from running\nwhen you know it will fail."),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},".bail()")," can be used multiple times in the same validation chain if desired:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('username')\n .isEmail()\n // If not an email, stop here\n .bail()\n .custom(checkDenylistDomain)\n // If domain is not allowed, don't go check if it already exists\n .bail()\n .custom(checkEmailExists);\n")),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"level")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"request"),", then also no further validation chains will run on the current request.\nFor example:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.get(\n '/search',\n query('query').notEmpty().bail({ level: 'request' }),\n // If `query` is empty, then the following validation chains won't run:\n query('query_type').isIn(['user', 'posts']),\n query('num_results').isInt(),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Functions such as ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,l.kt)("inlineCode",{parentName:"a"},"oneOf()"))," and ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/check-exact"},(0,l.kt)("inlineCode",{parentName:"a"},"checkExact()"))," can become slower\nwhen using request-level bail, since validation chains that would normally run in parallel need to\nrun in sequence.")),(0,l.kt)("h3",{id:"if"},(0,l.kt)("inlineCode",{parentName:"h3"},".if()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"if(condition: CustomValidator | ContextRunner): ValidationChain\n")),(0,l.kt)("p",null,"Adds a condition on whether the validation chain should continue running on a field or not."),(0,l.kt)("p",null,"The condition may be either a ",(0,l.kt)("a",{parentName:"p",href:"#custom"},"custom validator")," or a ",(0,l.kt)("a",{parentName:"p",href:"/docs/api/misc#contextrunner"},(0,l.kt)("inlineCode",{parentName:"a"},"ContextRunner")," instance"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('newPassword')\n // Only validate if the old password has been provided\n .if((value, { req }) => req.body.oldPassword)\n // Or, use a validation chain instead\n .if(body('oldPassword').notEmpty())\n // The length of the new password will only be checked if `oldPassword` is provided.\n .isLength({ min: 6 });\n")),(0,l.kt)("h3",{id:"not"},(0,l.kt)("inlineCode",{parentName:"h3"},".not()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"not(): ValidationChain\n")),(0,l.kt)("p",null,"Negates the result of the next validator in the chain."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"check('weekday').not().isIn(['sunday', 'saturday']);\n")),(0,l.kt)("h3",{id:"optional"},(0,l.kt)("inlineCode",{parentName:"h3"},".optional()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"optional(options?: boolean | {\n values?: 'undefined' | 'null' | 'falsy',\n nullable?: boolean,\n checkFalsy?: boolean,\n}): ValidationChain\n")),(0,l.kt)("p",null,"Marks the current validation chain as optional.\nAn optional field skips validation depending on its value, instead of failing it."),(0,l.kt)("p",null,"Which values are considered optional depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),".\nBy default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.nullable")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),"."),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"options")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then the field won't be optional."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Unlike validators and sanitizers, ",(0,l.kt)("inlineCode",{parentName:"p"},".optional()")," is not positional: it'll affect how values are interpreted,\nno matter where it happens in the chain."),(0,l.kt)("p",{parentName:"admonition"},"For example, there are no differences between this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').isLength({ max: 100 }).isJSON().optional().\n")),(0,l.kt)("p",{parentName:"admonition"},"and this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').optional().isLength({ max: 100 }).isJSON().\n"))),(0,l.kt)("h3",{id:"withmessage"},(0,l.kt)("inlineCode",{parentName:"h3"},".withMessage()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"withMessage(message: any): ValidationChain\n")),(0,l.kt)("p",null,"Sets the error message used by the previous validator."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/51dbd52b.2b1d4326.js b/assets/js/51dbd52b.2b1d4326.js new file mode 100644 index 0000000..bc9c160 --- /dev/null +++ b/assets/js/51dbd52b.2b1d4326.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2719],{7085:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/52d32b65.23a10be1.js b/assets/js/52d32b65.23a10be1.js deleted file mode 100644 index 1f089fd..0000000 --- a/assets/js/52d32b65.23a10be1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1981],{5318:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(7378);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),d=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=d(a),u=o,h=p["".concat(s,".").concat(u)]||p[u]||m[u]||r;return a?n.createElement(h,i(i({ref:t},c),{},{components:a})):n.createElement(h,i({ref:t},c))}));function h(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,i=new Array(r);i[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var d=2;d{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>l,metadata:()=>d,toc:()=>p});var n=a(5773),o=a(808),r=(a(7378),a(5318)),i=["components"],l={title:"matchedData"},s="matchedData()",d={unversionedId:"api/matched-data",id:"api/matched-data",title:"matchedData",description:"matchedData()",source:"@site/../docs/api/matched-data.md",sourceDirName:"api",slug:"/api/matched-data",permalink:"/docs/next/api/matched-data",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/matched-data.md",tags:[],version:"current",frontMatter:{title:"matchedData"},sidebar:"api",previous:{title:"ExpressValidator",permalink:"/docs/next/api/express-validator"},next:{title:"Errors and Validation Results",permalink:"/docs/next/api/validation-result"}},c={},p=[{value:"matchedData()",id:"matcheddata",level:2},{value:"With optional data",id:"with-optional-data",level:3},{value:"With invalid data",id:"with-invalid-data",level:3},{value:"Selecting data from specific locations",id:"selecting-data-from-specific-locations",level:3}],m={toc:p};function u(e){var t=e.components,a=(0,o.Z)(e,i);return(0,r.kt)("wrapper",(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"matcheddata"},(0,r.kt)("inlineCode",{parentName:"h1"},"matchedData()")),(0,r.kt)("h2",{id:"matcheddata"},(0,r.kt)("inlineCode",{parentName:"h2"},"matchedData()")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { matchedData } from 'express-validator';\nmatchedData(req, options?: {\n includeOptionals?: boolean,\n onlyValidData?: boolean,\n locations?: Location[],\n})\n")),(0,r.kt)("p",null,"Extracts data validated and/or sanitized by express-validator from the request, and returns an object\nwith them."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/contact-us',\n [body('email').isEmail(), body('message').notEmpty(), body('phone').optional().isMobilePhone()],\n (req, res) => {\n const result = validationResult(req);\n if (!result.isEmpty()) {\n // handle validation errors\n return res.send('Please fix the request');\n }\n\n const data = matchedData(req);\n // If phone isn't set:\n // => { email: 'foo@bar.com', message: 'Hi hello' }\n // If phone is set:\n // => { email: 'foo@bar.com', message: 'Hi hello', phone: '+1223334444' }\n },\n);\n")),(0,r.kt)("h3",{id:"with-optional-data"},"With optional data"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," doesn't return data that is optional and wasn't present in the request.",(0,r.kt)("br",null),"\nYou can set ",(0,r.kt)("inlineCode",{parentName:"p"},"options.includeOptionals")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," to change this behavior."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/contact-us',\n [body('email').isEmail(), body('message').notEmpty(), body('phone').optional().isMobilePhone()],\n (req, res) => {\n const data = matchedData(req, { includeOptionals: true });\n // If phone isn't set:\n // => { email: 'foo@bar.com', message: 'Hi hello', phone: undefined }\n },\n);\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain#optional"},"documentation on ",(0,r.kt)("inlineCode",{parentName:"a"},".optional()"))," to learn more.")),(0,r.kt)("h3",{id:"with-invalid-data"},"With invalid data"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," return only data that is valid; that is, if the request contains invalid data,\nit's omitted from the result.",(0,r.kt)("br",null),"\nYou can set ",(0,r.kt)("inlineCode",{parentName:"p"},"options.onlyValidData")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," to change this behavior."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/signup', body('email').isEmail(), body('password').notEmpty(), (req, res) => {\n const data = matchedData(req, { onlyValidData: false });\n // => { email: 'not_actually_an_email', password: '' }\n});\n")),(0,r.kt)("h3",{id:"selecting-data-from-specific-locations"},"Selecting data from specific locations"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," selects data validated on all of request's locations.\nYou can change this behavior by setting ",(0,r.kt)("inlineCode",{parentName:"p"},"options.locations")," to a list of the locations which you wish\nto select data from:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/signup',\n [body('email').isEmail(), body('password').notEmpty(), query('subscribe_newsletter').isBoolean()],\n (req, res) => {\n const data = matchedData(req);\n // => { email: 'foo@bar.com', password: '12345', subscribe_newsletter: true }\n\n const data2 = matchedData(req, { locations: ['query'] });\n // => { subscribe_newsletter: true }\n },\n);\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/52d32b65.623ff7e4.js b/assets/js/52d32b65.623ff7e4.js new file mode 100644 index 0000000..52908b6 --- /dev/null +++ b/assets/js/52d32b65.623ff7e4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1981],{5318:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>h});var n=a(7378);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},d=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(a),u=o,h=c["".concat(l,".").concat(u)]||c[u]||m[u]||r;return a?n.createElement(h,i(i({ref:t},d),{},{components:a})):n.createElement(h,i({ref:t},d))}));function h(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,i=new Array(r);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:o,i[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>p,toc:()=>c});var n=a(5773),o=a(808),r=(a(7378),a(5318)),i=["components"],s={title:"matchedData"},l="matchedData()",p={unversionedId:"api/matched-data",id:"api/matched-data",title:"matchedData",description:"matchedData()",source:"@site/../docs/api/matched-data.md",sourceDirName:"api",slug:"/api/matched-data",permalink:"/docs/next/api/matched-data",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/matched-data.md",tags:[],version:"current",frontMatter:{title:"matchedData"},sidebar:"api",previous:{title:"ExpressValidator",permalink:"/docs/next/api/express-validator"},next:{title:"Errors and Validation Results",permalink:"/docs/next/api/validation-result"}},d={},c=[{value:"matchedData()",id:"matcheddata",level:2},{value:"With optional data",id:"with-optional-data",level:3},{value:"With invalid data",id:"with-invalid-data",level:3},{value:"Selecting data from specific locations",id:"selecting-data-from-specific-locations",level:3},{value:"Typescript usage",id:"typescript-usage",level:3}],m={toc:c};function u(e){var t=e.components,a=(0,o.Z)(e,i);return(0,r.kt)("wrapper",(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"matcheddata"},(0,r.kt)("inlineCode",{parentName:"h1"},"matchedData()")),(0,r.kt)("h2",{id:"matcheddata"},(0,r.kt)("inlineCode",{parentName:"h2"},"matchedData()")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { matchedData } from 'express-validator';\nmatchedData(req, options?: {\n includeOptionals?: boolean,\n onlyValidData?: boolean,\n locations?: Location[],\n})\n")),(0,r.kt)("p",null,"Extracts data validated and/or sanitized by express-validator from the request, and returns an object\nwith them."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/contact-us',\n [body('email').isEmail(), body('message').notEmpty(), body('phone').optional().isMobilePhone()],\n (req, res) => {\n const result = validationResult(req);\n if (!result.isEmpty()) {\n // handle validation errors\n return res.send('Please fix the request');\n }\n\n const data = matchedData(req);\n // If phone isn't set:\n // => { email: 'foo@bar.com', message: 'Hi hello' }\n // If phone is set:\n // => { email: 'foo@bar.com', message: 'Hi hello', phone: '+1223334444' }\n },\n);\n")),(0,r.kt)("h3",{id:"with-optional-data"},"With optional data"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," doesn't return data that is optional and wasn't present in the request.",(0,r.kt)("br",null),"\nYou can set ",(0,r.kt)("inlineCode",{parentName:"p"},"options.includeOptionals")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," to change this behavior."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/contact-us',\n [body('email').isEmail(), body('message').notEmpty(), body('phone').optional().isMobilePhone()],\n (req, res) => {\n const data = matchedData(req, { includeOptionals: true });\n // If phone isn't set:\n // => { email: 'foo@bar.com', message: 'Hi hello', phone: undefined }\n },\n);\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain#optional"},"documentation on ",(0,r.kt)("inlineCode",{parentName:"a"},".optional()"))," to learn more.")),(0,r.kt)("h3",{id:"with-invalid-data"},"With invalid data"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," return only data that is valid; that is, if the request contains invalid data,\nit's omitted from the result.",(0,r.kt)("br",null),"\nYou can set ",(0,r.kt)("inlineCode",{parentName:"p"},"options.onlyValidData")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"false")," to change this behavior."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/signup', body('email').isEmail(), body('password').notEmpty(), (req, res) => {\n const data = matchedData(req, { onlyValidData: false });\n // => { email: 'not_actually_an_email', password: '' }\n});\n")),(0,r.kt)("h3",{id:"selecting-data-from-specific-locations"},"Selecting data from specific locations"),(0,r.kt)("p",null,"By default, ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," selects data validated on all of request's locations.\nYou can change this behavior by setting ",(0,r.kt)("inlineCode",{parentName:"p"},"options.locations")," to a list of the locations which you wish\nto select data from:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/signup',\n [body('email').isEmail(), body('password').notEmpty(), query('subscribe_newsletter').isBoolean()],\n (req, res) => {\n const data = matchedData(req);\n // => { email: 'foo@bar.com', password: '12345', subscribe_newsletter: true }\n\n const data2 = matchedData(req, { locations: ['query'] });\n // => { subscribe_newsletter: true }\n },\n);\n")),(0,r.kt)("h3",{id:"typescript-usage"},"Typescript usage"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"matchedData")," function signature accepts passing a ",(0,r.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/2/generics.html"},"Generic Type")," as the return type."),(0,r.kt)("p",null,"The default type is ",(0,r.kt)("inlineCode",{parentName:"p"},"Record"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { matchedData } from 'express-validator';\n\napp.post(\n '/contact-us',\n [body('email').isEmail(), body('message').notEmpty(), body('phone').optional().isMobilePhone()],\n (req, res) => {\n const result = validationResult(req);\n if (!result.isEmpty()) {\n // handle validation errors\n return res.send('Please fix the request');\n }\n\n const result = matchedData<{\n email: string;\n message: string;\n phone?: string;\n }>(req);\n },\n);\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/744891a1.1c06a569.js b/assets/js/744891a1.3dbb2311.js similarity index 59% rename from assets/js/744891a1.1c06a569.js rename to assets/js/744891a1.3dbb2311.js index 6f86a49..495afc2 100644 --- a/assets/js/744891a1.1c06a569.js +++ b/assets/js/744891a1.3dbb2311.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[550],{5318:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(7378);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=u(r),m=n,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||o;return r?a.createElement(f,l(l({ref:t},d),{},{components:r})):a.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var u=2;u{r.d(t,{Z:()=>l});var a=r(7378),n=r(8944);const o="tabItem_wHwb";function l(e){var t=e.children,r=e.hidden,l=e.className;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o,l),hidden:r},t)}},3930:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(5773),n=r(7378),o=r(8944),l=r(3457),i=r(3620),s=r(654),u=r(784),d=r(1819);function p(e){return function(e){var t,r;return null!=(t=null==(r=n.Children.map(e,(function(e){if(!e||(0,n.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function c(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:p(r);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId,o=(0,i.k6)(),l=function(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:r,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function v(e){var t,r,a,o,l=e.defaultValue,i=e.queryString,s=void 0!==i&&i,u=e.groupId,p=c(e),v=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!m({value:r,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var n=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:l,tabValues:p})})),h=v[0],k=v[1],y=f({queryString:s,groupId:u}),g=y[0],b=y[1],N=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Nk)(t),a=r[0],o=r[1],[a,(0,n.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=N[0],E=N[1],T=function(){var e=null!=g?g:w;return m({value:e,tabValues:p})?e:null}();return(0,n.useLayoutEffect)((function(){T&&k(T)}),[T]),{selectedValue:h,selectValue:(0,n.useCallback)((function(e){if(!m({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);k(e),b(e),E(e)}),[b,E,p]),tabValues:p}}var h=r(6457);const k="tabList_J5MA",y="tabItem_l0OV";function g(e){var t=e.className,r=e.block,i=e.selectedValue,s=e.selectValue,u=e.tabValues,d=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,r=d.indexOf(t),a=u[r].value;a!==i&&(p(t),s(a))},m=function(e){var t,r=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,n=d.indexOf(e.currentTarget)+1;r=null!=(a=d[n])?a:d[0];break;case"ArrowLeft":var o,l=d.indexOf(e.currentTarget)-1;r=null!=(o=d[l])?o:d[d.length-1]}null==(t=r)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},u.map((function(e){var t=e.value,r=e.label,l=e.attributes;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:function(e){return d.push(e)},onKeyDown:m,onClick:c},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":i===t})}),null!=r?r:t)})))}function b(e){var t=e.lazy,r=e.children,a=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===a}));return l?(0,n.cloneElement)(l,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=v(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",k)},n.createElement(g,(0,a.Z)({},e,t)),n.createElement(b,(0,a.Z)({},e,t)))}function w(e){var t=(0,h.Z)();return n.createElement(N,(0,a.Z)({key:String(t)},e))}},589:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>v,frontMatter:()=>u,metadata:()=>p,toc:()=>m});var a=r(5773),n=r(808),o=(r(7378),r(5318)),l=r(3930),i=r(9798),s=["components"],u={title:"Errors and Validation Results"},d=void 0,p={unversionedId:"api/validation-result",id:"version-7.0.0/api/validation-result",title:"Errors and Validation Results",description:"This page contains information about how you can determine if a request has been valid.",source:"@site/versioned_docs/version-7.0.0/api/validation-result.md",sourceDirName:"api",slug:"/api/validation-result",permalink:"/docs/api/validation-result",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/api/validation-result.md",tags:[],version:"7.0.0",frontMatter:{title:"Errors and Validation Results"},sidebar:"api",previous:{title:"matchedData",permalink:"/docs/api/matched-data"},next:{title:"Miscellaneous",permalink:"/docs/api/misc"}},c={},m=[{value:"validationResult()",id:"validationresult",level:2},{value:"withDefaults()",id:"withdefaults",level:3},{value:"ResultFactory<T>",id:"resultfactory",level:2},{value:"Result<T>",id:"result",level:2},{value:".isEmpty()",id:"isempty",level:3},{value:".formatWith()",id:"formatwith",level:3},{value:".array()",id:"array",level:3},{value:".mapped()",id:"mapped",level:3},{value:".throw()",id:"throw",level:3},{value:"Error types",id:"error-types",level:2},{value:"FieldValidationError",id:"fieldvalidationerror",level:3},{value:"AlternativeValidationError",id:"alternativevalidationerror",level:3},{value:"GroupedAlternativeValidationError",id:"groupedalternativevalidationerror",level:3},{value:"UnknownFieldValidationError",id:"unknownfieldvalidationerror",level:3},{value:"ValidationError",id:"validationerror",level:3},{value:"ErrorFormatter<T>",id:"errorformatter",level:2}],f={toc:m};function v(e){var t=e.components,r=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This page contains information about how you can determine if a request has been valid.\nIt also documents all possible validation error types."),(0,o.kt)("h2",{id:"validationresult"},(0,o.kt)("inlineCode",{parentName:"h2"},"validationResult()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult(req: Request): Result\n")),(0,o.kt)("p",null,"Extracts the validation results from a request, wraps them in a ",(0,o.kt)("a",{parentName:"p",href:"#result"},(0,o.kt)("inlineCode",{parentName:"a"},"Result")," object"),",\nand returns it."),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n")))),(0,o.kt)("h3",{id:"withdefaults"},(0,o.kt)("inlineCode",{parentName:"h3"},"withDefaults()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult.withDefaults(options: { formatter?: ErrorFormatter }): ResultFactory\n")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("inlineCode",{parentName:"p"},"validationResult()"),"-like function that uses the provided options as the defaults in\nthe returned ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object."),(0,o.kt)("p",null,"For example, it's possible to set the default ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter")," of a result like this:"),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\nconst myValidationResult = validationResult.withDefaults({\n formatter: error => error.msg,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors = myValidationResult(req).array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, ResultFactory, validationResult } from 'express-validator';\nconst myValidationResult: ResultFactory = validationResult.withDefaults({\n formatter: error => error.msg as string,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors: string[] = myValidationResult(req).array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h2",{id:"resultfactory"},(0,o.kt)("inlineCode",{parentName:"h2"},"ResultFactory")),(0,o.kt)("h2",{id:"result"},(0,o.kt)("inlineCode",{parentName:"h2"},"Result")),(0,o.kt)("p",null,"The result object is a wrapper around the validation state of a request.\nIt provides a couple of methods that you can use to determine if the request is valid or not."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The type parameter ",(0,o.kt)("inlineCode",{parentName:"p"},"T")," refers to the type that errors as returned by methods such as\n",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},".array()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},".mapped()"))," will have."),(0,o.kt)("p",{parentName:"admonition"},"Its default is ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")),", which can be changed by using ",(0,o.kt)("a",{parentName:"p",href:"#formatwith"},(0,o.kt)("inlineCode",{parentName:"a"},".formatWith()")),".")),(0,o.kt)("h3",{id:"isempty"},(0,o.kt)("inlineCode",{parentName:"h3"},".isEmpty()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(): boolean\n")),(0,o.kt)("p",null,"Returns whether the request contains validation errors, and thefore whether it's valid or not."),(0,o.kt)("h3",{id:"formatwith"},(0,o.kt)("inlineCode",{parentName:"h3"},".formatWith()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"formatWith(formatter: ErrorFormatter): Result\n")),(0,o.kt)("p",null,"Rewraps the validation state in a new ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object that uses ",(0,o.kt)("inlineCode",{parentName:"p"},"formatter")," as its ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter"),"."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"\ud83d\udcad Why does this method return a new Result?"),(0,o.kt)("p",null,"If you've read through other pages of this documentation, you might be asking yourself why can't\n",(0,o.kt)("inlineCode",{parentName:"p"},".formatWith()")," mutate itself, like validation chains do?"),(0,o.kt)("p",null,"The reason for this is simple: TypeScript.",(0,o.kt)("br",null),"\nIt's not possible to change the generic type of an existing object. If some code references the\nresult as ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ error: string }>"),", but after ",(0,o.kt)("inlineCode",{parentName:"p"},"formatWith")," it's now actually ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ message: string }>"),",\nsome code consuming the old ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type would not get compile-time errors about the type mismatch.")),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2 = result.formatWith(error => error.msg);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2: Result = result.formatWith(error => error.msg as string);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h3",{id:"array"},(0,o.kt)("inlineCode",{parentName:"h3"},".array()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"array(options?: { onlyFirstError?: boolean }): T[]\n")),(0,o.kt)("p",null,"Returns a list of all errors from all validated fields."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array();\n// => [{ msg: 'Invalid value', path: 'field1' }, { msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("p",null,"When ",(0,o.kt)("inlineCode",{parentName:"p"},"options.onlyFirstError")," is set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),", then only the first error of each field is returned:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array({ onlyFirstError: true });\n// => [{ msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("h3",{id:"mapped"},(0,o.kt)("inlineCode",{parentName:"h3"},".mapped()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"mapped(): Record\n")),(0,o.kt)("p",null,"Returns an object from field path to error.\nIf a field has multiple errors, only the first one is returned."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).mapped();\n// => { field1: { msg: 'Invalid value', ... }, field2: { msg: 'Invalid value', ... } }\n")),(0,o.kt)("h3",{id:"throw"},(0,o.kt)("inlineCode",{parentName:"h3"},".throw()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"throw(): void\n")),(0,o.kt)("p",null,"If the result object has errors, then this method throws an error decorated with the same methods as\nthe ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type.",(0,o.kt)("br",null),"\nThis is useful if you wish to forward the errors to the error handler middleware of your express.js\napplication, for example."),(0,o.kt)("p",null,"If the result object has no errors, then this method does nothing."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/hello', query('person').notEmpty(), (req, res) => {\n try {\n validationResult(req).throw();\n res.send(`Hello, ${req.query.person}!`);\n } catch (e) {\n res.status(400).send({ errors: e.mapped() });\n }\n});\n")),(0,o.kt)("h2",{id:"error-types"},"Error types"),(0,o.kt)("p",null,"Different APIs in express-validator cause different types of validation errors.\nAll of them are documented here:"),(0,o.kt)("h3",{id:"fieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"FieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type FieldValidationError = {\n type: 'field';\n location: Location;\n path: string;\n value: any;\n msg: any;\n};\n")),(0,o.kt)("p",null,"Represents an error caused when validating a single field, simple as that."),(0,o.kt)("h3",{id:"alternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"AlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative';\n msg: any;\n nestedErrors: FieldValidationError[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains a flat list of the individual field errors."),(0,o.kt)("h3",{id:"groupedalternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"GroupedAlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative_grouped';\n msg: any;\n nestedErrors: FieldValidationError[][];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains the list of the individual field errors, grouped by the alternative."),(0,o.kt)("h3",{id:"unknownfieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"UnknownFieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type UnknownFieldsError = {\n type: 'unknown_fields';\n msg: any;\n fields: { path: string; location: Location; value: any }[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when one or more fields are unknown; that is, they didn't have a validation\nchain when ",(0,o.kt)("inlineCode",{parentName:"p"},"checkExact()")," kicked off.\n",(0,o.kt)("inlineCode",{parentName:"p"},"fields")," contains the list of all unknown fields' paths, locations and values."),(0,o.kt)("h3",{id:"validationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"ValidationError")),(0,o.kt)("p",null,"Any of the validation errors.\nIt's possible to determine what the error actually is by looking at its ",(0,o.kt)("inlineCode",{parentName:"p"},"type")," property:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"switch (error.type) {\n case 'field':\n // `error` is a `FieldValidationError`\n console.log(error.path, error.location, error.value);\n break;\n\n case 'alternative':\n // `error` is an `AlternativeValidationError`\n console.log(error.nestedErrors);\n break;\n\n case 'alternative_grouped':\n // `error` is a `GroupedAlternativeValidationError`\n error.nestedErrors.forEach((nestedErrors, i) => {\n console.log(`Errors from chain ${i}:`);\n console.log(nestedErrors);\n });\n break;\n\n case 'unknown_fields':\n // `error` is an `UnknownFieldsError`\n console.log(error.fields);\n break;\n\n default:\n // Error is not any of the known types! Do something else.\n throw new Error(`Unknown error type ${error.type}`);\n}\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you're using TypeScript, this technique is known as ",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions"},"discriminated unions"),".")),(0,o.kt)("h2",{id:"errorformatter"},(0,o.kt)("inlineCode",{parentName:"h2"},"ErrorFormatter")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type ErrorFormatter = (error: ValidationError) => T;\n")),(0,o.kt)("p",null,"A function used to format errors returned by methods such as ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#mapped()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#array()")),".\nIt takes the ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},"unformatted error")," and must return a new value."))}v.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[550],{5318:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(7378);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=u(r),m=n,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||o;return r?a.createElement(f,l(l({ref:t},d),{},{components:r})):a.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var u=2;u{r.d(t,{Z:()=>l});var a=r(7378),n=r(8944);const o="tabItem_wHwb";function l(e){var t=e.children,r=e.hidden,l=e.className;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o,l),hidden:r},t)}},3930:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(5773),n=r(7378),o=r(8944),l=r(3457),i=r(3620),s=r(654),u=r(784),d=r(1819);function p(e){return function(e){var t,r;return null!=(t=null==(r=n.Children.map(e,(function(e){if(!e||(0,n.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function c(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:p(r);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId,o=(0,i.k6)(),l=function(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:r,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function v(e){var t,r,a,o,l=e.defaultValue,i=e.queryString,s=void 0!==i&&i,u=e.groupId,p=c(e),v=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!m({value:r,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var n=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:l,tabValues:p})})),h=v[0],k=v[1],y=f({queryString:s,groupId:u}),g=y[0],b=y[1],N=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Nk)(t),a=r[0],o=r[1],[a,(0,n.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=N[0],E=N[1],T=function(){var e=null!=g?g:w;return m({value:e,tabValues:p})?e:null}();return(0,n.useLayoutEffect)((function(){T&&k(T)}),[T]),{selectedValue:h,selectValue:(0,n.useCallback)((function(e){if(!m({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);k(e),b(e),E(e)}),[b,E,p]),tabValues:p}}var h=r(6457);const k="tabList_J5MA",y="tabItem_l0OV";function g(e){var t=e.className,r=e.block,i=e.selectedValue,s=e.selectValue,u=e.tabValues,d=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,r=d.indexOf(t),a=u[r].value;a!==i&&(p(t),s(a))},m=function(e){var t,r=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,n=d.indexOf(e.currentTarget)+1;r=null!=(a=d[n])?a:d[0];break;case"ArrowLeft":var o,l=d.indexOf(e.currentTarget)-1;r=null!=(o=d[l])?o:d[d.length-1]}null==(t=r)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},u.map((function(e){var t=e.value,r=e.label,l=e.attributes;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:function(e){return d.push(e)},onKeyDown:m,onClick:c},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":i===t})}),null!=r?r:t)})))}function b(e){var t=e.lazy,r=e.children,a=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===a}));return l?(0,n.cloneElement)(l,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=v(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",k)},n.createElement(g,(0,a.Z)({},e,t)),n.createElement(b,(0,a.Z)({},e,t)))}function w(e){var t=(0,h.Z)();return n.createElement(N,(0,a.Z)({key:String(t)},e))}},589:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>v,frontMatter:()=>u,metadata:()=>p,toc:()=>m});var a=r(5773),n=r(808),o=(r(7378),r(5318)),l=r(3930),i=r(9798),s=["components"],u={title:"Errors and Validation Results"},d=void 0,p={unversionedId:"api/validation-result",id:"version-7.0.0/api/validation-result",title:"Errors and Validation Results",description:"This page contains information about how you can determine if a request has been valid.",source:"@site/versioned_docs/version-7.0.0/api/validation-result.md",sourceDirName:"api",slug:"/api/validation-result",permalink:"/docs/api/validation-result",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/api/validation-result.md",tags:[],version:"7.0.0",frontMatter:{title:"Errors and Validation Results"},sidebar:"api",previous:{title:"matchedData",permalink:"/docs/api/matched-data"},next:{title:"Miscellaneous",permalink:"/docs/api/misc"}},c={},m=[{value:"validationResult()",id:"validationresult",level:2},{value:"withDefaults()",id:"withdefaults",level:3},{value:"ResultFactory<T>",id:"resultfactory",level:2},{value:"Result<T>",id:"result",level:2},{value:".isEmpty()",id:"isempty",level:3},{value:".formatWith()",id:"formatwith",level:3},{value:".array()",id:"array",level:3},{value:".mapped()",id:"mapped",level:3},{value:".throw()",id:"throw",level:3},{value:"Error types",id:"error-types",level:2},{value:"FieldValidationError",id:"fieldvalidationerror",level:3},{value:"AlternativeValidationError",id:"alternativevalidationerror",level:3},{value:"GroupedAlternativeValidationError",id:"groupedalternativevalidationerror",level:3},{value:"UnknownFieldValidationError",id:"unknownfieldvalidationerror",level:3},{value:"ValidationError",id:"validationerror",level:3},{value:"ErrorFormatter<T>",id:"errorformatter",level:2}],f={toc:m};function v(e){var t=e.components,r=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This page contains information about how you can determine if a request has been valid.\nIt also documents all possible validation error types."),(0,o.kt)("h2",{id:"validationresult"},(0,o.kt)("inlineCode",{parentName:"h2"},"validationResult()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult(req: Request): Result\n")),(0,o.kt)("p",null,"Extracts the validation results from a request, wraps them in a ",(0,o.kt)("a",{parentName:"p",href:"#result"},(0,o.kt)("inlineCode",{parentName:"a"},"Result")," object"),",\nand returns it."),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n")))),(0,o.kt)("h3",{id:"withdefaults"},(0,o.kt)("inlineCode",{parentName:"h3"},"withDefaults()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult.withDefaults(options: { formatter?: ErrorFormatter }): ResultFactory\n")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("inlineCode",{parentName:"p"},"validationResult()"),"-like function that uses the provided options as the defaults in\nthe returned ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object."),(0,o.kt)("p",null,"For example, it's possible to set the default ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter")," of a result like this:"),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\nconst myValidationResult = validationResult.withDefaults({\n formatter: error => error.msg,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors = myValidationResult(req).array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, ResultFactory, validationResult } from 'express-validator';\nconst myValidationResult: ResultFactory = validationResult.withDefaults({\n formatter: error => error.msg as string,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors: string[] = myValidationResult(req).array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h2",{id:"resultfactory"},(0,o.kt)("inlineCode",{parentName:"h2"},"ResultFactory")),(0,o.kt)("h2",{id:"result"},(0,o.kt)("inlineCode",{parentName:"h2"},"Result")),(0,o.kt)("p",null,"The result object is a wrapper around the validation state of a request.\nIt provides a couple of methods that you can use to determine if the request is valid or not."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The type parameter ",(0,o.kt)("inlineCode",{parentName:"p"},"T")," refers to the type that errors as returned by methods such as\n",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},".array()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},".mapped()"))," will have."),(0,o.kt)("p",{parentName:"admonition"},"Its default is ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")),", which can be changed by using ",(0,o.kt)("a",{parentName:"p",href:"#formatwith"},(0,o.kt)("inlineCode",{parentName:"a"},".formatWith()")),".")),(0,o.kt)("h3",{id:"isempty"},(0,o.kt)("inlineCode",{parentName:"h3"},".isEmpty()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(): boolean\n")),(0,o.kt)("p",null,"Returns whether the request contains validation errors, and therefore whether it's valid or not."),(0,o.kt)("h3",{id:"formatwith"},(0,o.kt)("inlineCode",{parentName:"h3"},".formatWith()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"formatWith(formatter: ErrorFormatter): Result\n")),(0,o.kt)("p",null,"Rewraps the validation state in a new ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object that uses ",(0,o.kt)("inlineCode",{parentName:"p"},"formatter")," as its ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter"),"."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"\ud83d\udcad Why does this method return a new Result?"),(0,o.kt)("p",null,"If you've read through other pages of this documentation, you might be asking yourself why can't\n",(0,o.kt)("inlineCode",{parentName:"p"},".formatWith()")," mutate itself, like validation chains do?"),(0,o.kt)("p",null,"The reason for this is simple: TypeScript.",(0,o.kt)("br",null),"\nIt's not possible to change the generic type of an existing object. If some code references the\nresult as ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ error: string }>"),", but after ",(0,o.kt)("inlineCode",{parentName:"p"},"formatWith")," it's now actually ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ message: string }>"),",\nsome code consuming the old ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type would not get compile-time errors about the type mismatch.")),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2 = result.formatWith(error => error.msg);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2: Result = result.formatWith(error => error.msg as string);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h3",{id:"array"},(0,o.kt)("inlineCode",{parentName:"h3"},".array()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"array(options?: { onlyFirstError?: boolean }): T[]\n")),(0,o.kt)("p",null,"Returns a list of all errors from all validated fields."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array();\n// => [{ msg: 'Invalid value', path: 'field1' }, { msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("p",null,"When ",(0,o.kt)("inlineCode",{parentName:"p"},"options.onlyFirstError")," is set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),", then only the first error of each field is returned:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array({ onlyFirstError: true });\n// => [{ msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("h3",{id:"mapped"},(0,o.kt)("inlineCode",{parentName:"h3"},".mapped()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"mapped(): Record\n")),(0,o.kt)("p",null,"Returns an object from field path to error.\nIf a field has multiple errors, only the first one is returned."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).mapped();\n// => { field1: { msg: 'Invalid value', ... }, field2: { msg: 'Invalid value', ... } }\n")),(0,o.kt)("h3",{id:"throw"},(0,o.kt)("inlineCode",{parentName:"h3"},".throw()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"throw(): void\n")),(0,o.kt)("p",null,"If the result object has errors, then this method throws an error decorated with the same methods as\nthe ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type.",(0,o.kt)("br",null),"\nThis is useful if you wish to forward the errors to the error handler middleware of your express.js\napplication, for example."),(0,o.kt)("p",null,"If the result object has no errors, then this method does nothing."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/hello', query('person').notEmpty(), (req, res) => {\n try {\n validationResult(req).throw();\n res.send(`Hello, ${req.query.person}!`);\n } catch (e) {\n res.status(400).send({ errors: e.mapped() });\n }\n});\n")),(0,o.kt)("h2",{id:"error-types"},"Error types"),(0,o.kt)("p",null,"Different APIs in express-validator cause different types of validation errors.\nAll of them are documented here:"),(0,o.kt)("h3",{id:"fieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"FieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type FieldValidationError = {\n type: 'field';\n location: Location;\n path: string;\n value: any;\n msg: any;\n};\n")),(0,o.kt)("p",null,"Represents an error caused when validating a single field, simple as that."),(0,o.kt)("h3",{id:"alternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"AlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative';\n msg: any;\n nestedErrors: FieldValidationError[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains a flat list of the individual field errors."),(0,o.kt)("h3",{id:"groupedalternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"GroupedAlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative_grouped';\n msg: any;\n nestedErrors: FieldValidationError[][];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains the list of the individual field errors, grouped by the alternative."),(0,o.kt)("h3",{id:"unknownfieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"UnknownFieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type UnknownFieldsError = {\n type: 'unknown_fields';\n msg: any;\n fields: { path: string; location: Location; value: any }[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when one or more fields are unknown; that is, they didn't have a validation\nchain when ",(0,o.kt)("inlineCode",{parentName:"p"},"checkExact()")," kicked off.\n",(0,o.kt)("inlineCode",{parentName:"p"},"fields")," contains the list of all unknown fields' paths, locations and values."),(0,o.kt)("h3",{id:"validationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"ValidationError")),(0,o.kt)("p",null,"Any of the validation errors.\nIt's possible to determine what the error actually is by looking at its ",(0,o.kt)("inlineCode",{parentName:"p"},"type")," property:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"switch (error.type) {\n case 'field':\n // `error` is a `FieldValidationError`\n console.log(error.path, error.location, error.value);\n break;\n\n case 'alternative':\n // `error` is an `AlternativeValidationError`\n console.log(error.nestedErrors);\n break;\n\n case 'alternative_grouped':\n // `error` is a `GroupedAlternativeValidationError`\n error.nestedErrors.forEach((nestedErrors, i) => {\n console.log(`Errors from chain ${i}:`);\n console.log(nestedErrors);\n });\n break;\n\n case 'unknown_fields':\n // `error` is an `UnknownFieldsError`\n console.log(error.fields);\n break;\n\n default:\n // Error is not any of the known types! Do something else.\n throw new Error(`Unknown error type ${error.type}`);\n}\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you're using TypeScript, this technique is known as ",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions"},"discriminated unions"),".")),(0,o.kt)("h2",{id:"errorformatter"},(0,o.kt)("inlineCode",{parentName:"h2"},"ErrorFormatter")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type ErrorFormatter = (error: ValidationError) => T;\n")),(0,o.kt)("p",null,"A function used to format errors returned by methods such as ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#mapped()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#array()")),".\nIt takes the ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},"unformatted error")," and must return a new value."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7e82ff00.eef9a167.js b/assets/js/7e82ff00.6a93afa2.js similarity index 55% rename from assets/js/7e82ff00.eef9a167.js rename to assets/js/7e82ff00.6a93afa2.js index ed6893e..cd979cc 100644 --- a/assets/js/7e82ff00.eef9a167.js +++ b/assets/js/7e82ff00.6a93afa2.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6971],{5318:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var r=n(7378);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=d(n),u=a,k=m["".concat(p,".").concat(u)]||m[u]||c[u]||o;return n?r.createElement(k,i(i({ref:t},s),{},{components:n})):r.createElement(k,i({ref:t},s))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>u,frontMatter:()=>l,metadata:()=>d,toc:()=>m});var r=n(5773),a=n(808),o=(n(7378),n(5318)),i=["components"],l={title:"Migration from v6 to v7"},p=void 0,d={unversionedId:"migration-v6-to-v7",id:"migration-v6-to-v7",title:"Migration from v6 to v7",description:"The migration process from express-validator v6.x.x to v7.x.x is manual.",source:"@site/../docs/migration-v6-to-v7.md",sourceDirName:".",slug:"/migration-v6-to-v7",permalink:"/docs/next/migration-v6-to-v7",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/migration-v6-to-v7.md",tags:[],version:"current",frontMatter:{title:"Migration from v6 to v7"},sidebar:"docs",previous:{title:"Migration from v5 to v6",permalink:"/docs/next/migration-v5-to-v6"}},s={},m=[{value:"Support",id:"support",level:2},{value:"Removed deprecated APIs",id:"removed-deprecated-apis",level:2},{value:"Import paths",id:"import-paths",level:3},{value:"Sanitization-only APIs",id:"sanitization-only-apis",level:3},{value:"TypeScript types",id:"typescript-types",level:3},{value:"Validators",id:"validators",level:2},{value:"isObject()",id:"isobject",level:3},{value:"Validation errors",id:"validation-errors",level:2},{value:"Renamed properties",id:"renamed-properties",level:3},{value:"Telling error types apart",id:"telling-error-types-apart",level:3},{value:"oneOf()",id:"oneof",level:2},{value:"Signature",id:"oneof-signature",level:3},{value:"Error type",id:"oneof-error-type",level:3},{value:"Other breaking changes",id:"other-breaking-changes",level:2}],c={toc:m};function u(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The migration process from express-validator v6.x.x to v7.x.x is manual.\nYou'll need to follow these steps after you've upgraded the package on your project."),(0,o.kt)("h2",{id:"support"},"Support"),(0,o.kt)("p",null,"Node 12 is no longer supported. You'll need to upgrade to Node 14 or newer."),(0,o.kt)("h2",{id:"removed-deprecated-apis"},"Removed deprecated APIs"),(0,o.kt)("h3",{id:"import-paths"},"Import paths"),(0,o.kt)("p",null,"Importing from ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator/check")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator/filter")," had been deprecated since v6.0.0.\nThey are now gone from the package, and you should always import from ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator"),"."),(0,o.kt)("h3",{id:"sanitization-only-apis"},"Sanitization-only APIs"),(0,o.kt)("p",null,"All ",(0,o.kt)("inlineCode",{parentName:"p"},"sanitize")," functions have been removed, as ",(0,o.kt)("inlineCode",{parentName:"p"},"check")," functions offer exactly the same functionality,\nand more."),(0,o.kt)("p",null,"You can replace the following snippets on your codebase:"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"From"),(0,o.kt)("th",{parentName:"tr",align:null},"To"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitize(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"check(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeBody(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"body(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeCookie(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"cookie(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeHeader(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"header(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeParam(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"param(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeQuery(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"query(field)"))))),(0,o.kt)("h3",{id:"typescript-types"},"TypeScript types"),(0,o.kt)("p",null,"The following types have been removed from express-validator and can be transparently replaced:"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"From"),(0,o.kt)("th",{parentName:"tr",align:null},"To"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"ValidationParamSchema")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"ParamSchema"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"Validationchema")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"Schema"))))),(0,o.kt)("h2",{id:"validators"},"Validators"),(0,o.kt)("h3",{id:"isobject"},(0,o.kt)("inlineCode",{parentName:"h3"},"isObject()")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"strict")," option, when unset, would default to ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),", meaning that arrays and ",(0,o.kt)("inlineCode",{parentName:"p"},"null")," values would\npass validation. The new default value is ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,o.kt)("p",null,"To maintain v6.x.x behavior, the following change is necessary:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"- check('object').isObject()\n+ check('object').isObject({ strict: false })\n")),(0,o.kt)("h2",{id:"validation-errors"},"Validation errors"),(0,o.kt)("p",null,"Validation errors used to be objects in the format ",(0,o.kt)("inlineCode",{parentName:"p"},"{ param, msg, value, location, nestedErrors }"),",\nwhere ",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," is only present in errors caused by ",(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()"),", which would also always have the\n",(0,o.kt)("inlineCode",{parentName:"p"},"path: '_error'"),"."),(0,o.kt)("p",null,"Given that there are now a couple more ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/validation-result#error-types"},"error types"),",\na couple of changes were necessary:"),(0,o.kt)("h3",{id:"renamed-properties"},"Renamed properties"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"param")," property has been renamed to ",(0,o.kt)("inlineCode",{parentName:"p"},"path"),", to reduce chance of confusion with the ",(0,o.kt)("inlineCode",{parentName:"p"},"req.params"),"\nlocation."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"const errors = validationResult(req).array();\n- console.log(`Error on the field ${errors[0].param}`);\n+ console.log(`Error on the field ${errors[0].path}`);\n")),(0,o.kt)("h3",{id:"telling-error-types-apart"},"Telling error types apart"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ValidationError")," type in TypeScript is now a\n",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions"},"discriminated union"),"."),(0,o.kt)("p",null,"It might be necessary to use a ",(0,o.kt)("inlineCode",{parentName:"p"},"switch")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"if")," statements to check that you're dealing with the\ntype that you want to format/debug. For example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).formatWith(error => {\n switch (error.type) {\n case 'field':\n // this is a FieldValidationError\n return `Error on field ${error.path}`;\n\n case 'alternative':\n case 'grouped_alternative':\n // this is an AlternativeValidationError or GroupedAlternativeValidationError\n console.log(error.nestedErrors);\n return error.msg;\n\n case 'unknown_fields':\n // this is an UnknownFieldValidationError\n const fields = error.fields.map(field => field.path).join(', ');\n return `Unknown fields found, please remove them: ${fields}`;\n\n default:\n // Not a known type.\n throw new Error(`Not a known express-validator error: ${error.type}`);\n }\n});\n")),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"For the up-to-date documentation, see the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/validation-result#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")," type"),".")),(0,o.kt)("h2",{id:"oneof"},(0,o.kt)("inlineCode",{parentName:"h2"},"oneOf()")),(0,o.kt)("h3",{id:"oneof-signature"},"Signature"),(0,o.kt)("p",null,"The signature of ",(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()")," has changed. Its second argument used to be the message to use,\nbut now it's an object of options."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n- 'At least one contact method must be provided',\n+ { message: 'At least one contact method must be provided' }\n)\n")),(0,o.kt)("p",null,"Furthermore, if ",(0,o.kt)("inlineCode",{parentName:"p"},"message")," is a function, its signature has also changed to include the list of\nnested errors:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n- (req) => {\n+ {\n+ message: (nestedErrors, req) => {\n+ console.log(nestedErrors);\n return req.translate('one_of_error'),\n }\n)\n")),(0,o.kt)("h3",{id:"oneof-error-type"},"Error type"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()")," used to be a bit inflexible with how it returned nested errors, which is why it now takes\nan ",(0,o.kt)("inlineCode",{parentName:"p"},"errorType")," option that allows extra customizations."),(0,o.kt)("p",null,"To maintain behavior from v6.x.x, make the following change:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n+ { errorType: 'flat' }\n)\n")),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"Learn more on the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of#error-types"},"error types documentation"),".")),(0,o.kt)("h2",{id:"other-breaking-changes"},"Other breaking changes"),(0,o.kt)("p",null,"Please check ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/express-validator/express-validator/releases/tag/v7.0.0"},"express-validator v7.0.0 release notes"),"\nto learn about other breaking changes."))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6971],{5318:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var r=n(7378);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=d(n),u=a,k=m["".concat(p,".").concat(u)]||m[u]||c[u]||o;return n?r.createElement(k,i(i({ref:t},s),{},{components:n})):r.createElement(k,i({ref:t},s))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>u,frontMatter:()=>l,metadata:()=>d,toc:()=>m});var r=n(5773),a=n(808),o=(n(7378),n(5318)),i=["components"],l={title:"Migration from v6 to v7"},p=void 0,d={unversionedId:"migration-v6-to-v7",id:"migration-v6-to-v7",title:"Migration from v6 to v7",description:"The migration process from express-validator v6.x.x to v7.x.x is manual.",source:"@site/../docs/migration-v6-to-v7.md",sourceDirName:".",slug:"/migration-v6-to-v7",permalink:"/docs/next/migration-v6-to-v7",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/migration-v6-to-v7.md",tags:[],version:"current",frontMatter:{title:"Migration from v6 to v7"},sidebar:"docs",previous:{title:"Migration from v5 to v6",permalink:"/docs/next/migration-v5-to-v6"}},s={},m=[{value:"Support",id:"support",level:2},{value:"Removed deprecated APIs",id:"removed-deprecated-apis",level:2},{value:"Import paths",id:"import-paths",level:3},{value:"Sanitization-only APIs",id:"sanitization-only-apis",level:3},{value:"TypeScript types",id:"typescript-types",level:3},{value:"Validators",id:"validators",level:2},{value:"isObject()",id:"isobject",level:3},{value:"Validation errors",id:"validation-errors",level:2},{value:"Renamed properties",id:"renamed-properties",level:3},{value:"Telling error types apart",id:"telling-error-types-apart",level:3},{value:"oneOf()",id:"oneof",level:2},{value:"Signature",id:"oneof-signature",level:3},{value:"Error type",id:"oneof-error-type",level:3},{value:"Other breaking changes",id:"other-breaking-changes",level:2}],c={toc:m};function u(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The migration process from express-validator v6.x.x to v7.x.x is manual.\nYou'll need to follow these steps after you've upgraded the package on your project."),(0,o.kt)("h2",{id:"support"},"Support"),(0,o.kt)("p",null,"Node 12 is no longer supported. You'll need to upgrade to Node 14 or newer."),(0,o.kt)("h2",{id:"removed-deprecated-apis"},"Removed deprecated APIs"),(0,o.kt)("h3",{id:"import-paths"},"Import paths"),(0,o.kt)("p",null,"Importing from ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator/check")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator/filter")," had been deprecated since v6.0.0.\nThey are now gone from the package, and you should always import from ",(0,o.kt)("inlineCode",{parentName:"p"},"express-validator"),"."),(0,o.kt)("h3",{id:"sanitization-only-apis"},"Sanitization-only APIs"),(0,o.kt)("p",null,"All ",(0,o.kt)("inlineCode",{parentName:"p"},"sanitize")," functions have been removed, as ",(0,o.kt)("inlineCode",{parentName:"p"},"check")," functions offer exactly the same functionality,\nand more."),(0,o.kt)("p",null,"You can replace the following snippets on your codebase:"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"From"),(0,o.kt)("th",{parentName:"tr",align:null},"To"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitize(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"check(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeBody(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"body(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeCookie(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"cookie(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeHeader(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"header(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeParam(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"param(field)"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"sanitizeQuery(field)")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"query(field)"))))),(0,o.kt)("h3",{id:"typescript-types"},"TypeScript types"),(0,o.kt)("p",null,"The following types have been removed from express-validator and can be transparently replaced:"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"From"),(0,o.kt)("th",{parentName:"tr",align:null},"To"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"ValidationParamSchema")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"ParamSchema"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"ValidationSchema")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"Schema"))))),(0,o.kt)("h2",{id:"validators"},"Validators"),(0,o.kt)("h3",{id:"isobject"},(0,o.kt)("inlineCode",{parentName:"h3"},"isObject()")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"strict")," option, when unset, would default to ",(0,o.kt)("inlineCode",{parentName:"p"},"false"),", meaning that arrays and ",(0,o.kt)("inlineCode",{parentName:"p"},"null")," values would\npass validation. The new default value is ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,o.kt)("p",null,"To maintain v6.x.x behavior, the following change is necessary:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"- check('object').isObject()\n+ check('object').isObject({ strict: false })\n")),(0,o.kt)("h2",{id:"validation-errors"},"Validation errors"),(0,o.kt)("p",null,"Validation errors used to be objects in the format ",(0,o.kt)("inlineCode",{parentName:"p"},"{ param, msg, value, location, nestedErrors }"),",\nwhere ",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," is only present in errors caused by ",(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()"),", which would also always have the\n",(0,o.kt)("inlineCode",{parentName:"p"},"path: '_error'"),"."),(0,o.kt)("p",null,"Given that there are now a couple more ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/validation-result#error-types"},"error types"),",\na couple of changes were necessary:"),(0,o.kt)("h3",{id:"renamed-properties"},"Renamed properties"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"param")," property has been renamed to ",(0,o.kt)("inlineCode",{parentName:"p"},"path"),", to reduce chance of confusion with the ",(0,o.kt)("inlineCode",{parentName:"p"},"req.params"),"\nlocation."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"const errors = validationResult(req).array();\n- console.log(`Error on the field ${errors[0].param}`);\n+ console.log(`Error on the field ${errors[0].path}`);\n")),(0,o.kt)("h3",{id:"telling-error-types-apart"},"Telling error types apart"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ValidationError")," type in TypeScript is now a\n",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions"},"discriminated union"),"."),(0,o.kt)("p",null,"It might be necessary to use a ",(0,o.kt)("inlineCode",{parentName:"p"},"switch")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"if")," statements to check that you're dealing with the\ntype that you want to format/debug. For example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).formatWith(error => {\n switch (error.type) {\n case 'field':\n // this is a FieldValidationError\n return `Error on field ${error.path}`;\n\n case 'alternative':\n case 'grouped_alternative':\n // this is an AlternativeValidationError or GroupedAlternativeValidationError\n console.log(error.nestedErrors);\n return error.msg;\n\n case 'unknown_fields':\n // this is an UnknownFieldValidationError\n const fields = error.fields.map(field => field.path).join(', ');\n return `Unknown fields found, please remove them: ${fields}`;\n\n default:\n // Not a known type.\n throw new Error(`Not a known express-validator error: ${error.type}`);\n }\n});\n")),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"For the up-to-date documentation, see the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/validation-result#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")," type"),".")),(0,o.kt)("h2",{id:"oneof"},(0,o.kt)("inlineCode",{parentName:"h2"},"oneOf()")),(0,o.kt)("h3",{id:"oneof-signature"},"Signature"),(0,o.kt)("p",null,"The signature of ",(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()")," has changed. Its second argument used to be the message to use,\nbut now it's an object of options."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n- 'At least one contact method must be provided',\n+ { message: 'At least one contact method must be provided' }\n)\n")),(0,o.kt)("p",null,"Furthermore, if ",(0,o.kt)("inlineCode",{parentName:"p"},"message")," is a function, its signature has also changed to include the list of\nnested errors:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n- (req) => {\n+ {\n+ message: (nestedErrors, req) => {\n+ console.log(nestedErrors);\n return req.translate('one_of_error'),\n }\n)\n")),(0,o.kt)("h3",{id:"oneof-error-type"},"Error type"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"oneOf()")," used to be a bit inflexible with how it returned nested errors, which is why it now takes\nan ",(0,o.kt)("inlineCode",{parentName:"p"},"errorType")," option that allows extra customizations."),(0,o.kt)("p",null,"To maintain behavior from v6.x.x, make the following change:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-diff"},"oneOf(\n [check('email').isEmail(), check('phone').isMobilePhone()],\n+ { errorType: 'flat' }\n)\n")),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"Learn more on the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of#error-types"},"error types documentation"),".")),(0,o.kt)("h2",{id:"other-breaking-changes"},"Other breaking changes"),(0,o.kt)("p",null,"Please check ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/express-validator/express-validator/releases/tag/v7.0.0"},"express-validator v7.0.0 release notes"),"\nto learn about other breaking changes."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/84527cbe.a6938fce.js b/assets/js/84527cbe.a6938fce.js deleted file mode 100644 index b91c0be..0000000 --- a/assets/js/84527cbe.a6938fce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2467],{5745:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/9fd49971.86cdb06c.js b/assets/js/9fd49971.86cdb06c.js deleted file mode 100644 index 82f9739..0000000 --- a/assets/js/9fd49971.86cdb06c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4387],{3769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/b3532997.04181932.js b/assets/js/b3532997.04181932.js deleted file mode 100644 index ac3aecd..0000000 --- a/assets/js/b3532997.04181932.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7035],{5318:(e,n,a)=>{a.d(n,{Zo:()=>c,kt:()=>v});var t=a(7378);function r(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function i(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function o(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=t.createContext({}),u=function(e){var n=t.useContext(l),a=n;return e&&(a="function"==typeof e?e(n):o(o({},n),e)),a},c=function(e){var n=u(e.components);return t.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var a=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(a),m=r,v=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return a?t.createElement(v,o(o({ref:n},c),{},{components:a})):t.createElement(v,o({ref:n},c))}));function v(e,n){var a=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{a.d(n,{Z:()=>o});var t=a(7378),r=a(8944);const i="tabItem_wHwb";function o(e){var n=e.children,a=e.hidden,o=e.className;return t.createElement("div",{role:"tabpanel",className:(0,r.Z)(i,o),hidden:a},n)}},3930:(e,n,a)=>{a.d(n,{Z:()=>x});var t=a(5773),r=a(7378),i=a(8944),o=a(3457),s=a(3620),l=a(654),u=a(784),c=a(1819);function d(e){return function(e){var n,a;return null!=(n=null==(a=r.Children.map(e,(function(e){if(!e||(0,r.isValidElement)(e)&&(n=e.props)&&"object"==typeof n&&"value"in n)return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:a.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function p(e){var n=e.values,a=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:d(a);return function(e){var n=(0,u.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,a])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function v(e){var n=e.queryString,a=void 0!==n&&n,t=e.groupId,i=(0,s.k6)(),o=function(e){var n=e.queryString,a=void 0!==n&&n,t=e.groupId;if("string"==typeof a)return a;if(!1===a)return null;if(!0===a&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=t?t:null}({queryString:a,groupId:t});return[(0,l._X)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function f(e){var n,a,t,i,o=e.defaultValue,s=e.queryString,l=void 0!==s&&s,u=e.groupId,d=p(e),f=(0,r.useState)((function(){return function(e){var n,a=e.defaultValue,t=e.tabValues;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(a){if(!m({value:a,tabValues:t}))throw new Error('Docusaurus error: The has a defaultValue "'+a+'" but none of its children has the corresponding value. Available values are: '+t.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return a}var r=null!=(n=t.find((function(e){return e.default})))?n:t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:d})})),h=f[0],b=f[1],g=v({queryString:l,groupId:u}),y=g[0],w=g[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),a=(0,c.Nk)(n),t=a[0],i=a[1],[t,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),x=k[0],E=k[1],N=function(){var e=null!=y?y:x;return m({value:e,tabValues:d})?e:null}();return(0,r.useLayoutEffect)((function(){N&&b(N)}),[N]),{selectedValue:h,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),E(e)}),[w,E,d]),tabValues:d}}var h=a(6457);const b="tabList_J5MA",g="tabItem_l0OV";function y(e){var n=e.className,a=e.block,s=e.selectedValue,l=e.selectValue,u=e.tabValues,c=[],d=(0,o.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var n=e.currentTarget,a=c.indexOf(n),t=u[a].value;t!==s&&(d(n),l(t))},m=function(e){var n,a=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var t,r=c.indexOf(e.currentTarget)+1;a=null!=(t=c[r])?t:c[0];break;case"ArrowLeft":var i,o=c.indexOf(e.currentTarget)-1;a=null!=(i=c[o])?i:c[c.length-1]}null==(n=a)||n.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":a},n)},u.map((function(e){var n=e.value,a=e.label,o=e.attributes;return r.createElement("li",(0,t.Z)({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,key:n,ref:function(e){return c.push(e)},onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",g,null==o?void 0:o.className,{"tabs__item--active":s===n})}),null!=a?a:n)})))}function w(e){var n=e.lazy,a=e.children,t=e.selectedValue,i=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===t}));return o?(0,r.cloneElement)(o,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t})})))}function k(e){var n=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b)},r.createElement(y,(0,t.Z)({},e,n)),r.createElement(w,(0,t.Z)({},e,n)))}function x(e){var n=(0,h.Z)();return r.createElement(k,(0,t.Z)({key:String(n)},e))}},7791:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var t=a(5773),r=a(808),i=(a(7378),a(5318)),o=a(3930),s=a(9798),l=["components"],u={title:"Manually running validations"},c=void 0,d={unversionedId:"guides/manually-running",id:"version-7.0.0/guides/manually-running",title:"Manually running validations",description:"express-validator favors the declarative way of doing things that express middlewares bring.",source:"@site/versioned_docs/version-7.0.0/guides/manually-running.md",sourceDirName:"guides",slug:"/guides/manually-running",permalink:"/docs/guides/manually-running",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/guides/manually-running.md",tags:[],version:"7.0.0",frontMatter:{title:"Manually running validations"},sidebar:"docs",previous:{title:"Customizing express-validator",permalink:"/docs/guides/customizing"},next:{title:"Schema validation",permalink:"/docs/guides/schema-validation"}},p={},m=[{value:"Example: creating own validation runner",id:"example-creating-own-validation-runner",level:2},{value:"Example: validating with a condition",id:"example-validating-with-a-condition",level:2}],v={toc:m};function f(e){var n=e.components,a=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,t.Z)({},v,a,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"express-validator favors the declarative way of doing things that express middlewares bring.\nThis means most of the APIs look and work better when simply passed into an express route handler."),(0,i.kt)("p",null,"You can, however, take control of running these validations into your own middleware/route handler."),(0,i.kt)("p",null,"This is possible in express-validator functions which return an object which implements the\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/misc#contextrunner"},(0,i.kt)("inlineCode",{parentName:"a"},"ContextRunner")),", an interface implemented by all of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/validation-chain"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationChain")),", ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/check-exact"},(0,i.kt)("inlineCode",{parentName:"a"},"checkExact()")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/check-schema"},(0,i.kt)("inlineCode",{parentName:"a"},"checkSchema()"))," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,i.kt)("inlineCode",{parentName:"a"},"oneOf")),"."),(0,i.kt)("p",null,"Check the examples below to understand how this method can help you:"),(0,i.kt)("h2",{id:"example-creating-own-validation-runner"},"Example: creating own validation runner"),(0,i.kt)(o.Z,{mdxType:"Tabs"},(0,i.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"const express = require('express');\nconst { validationResult, ValidationChain } = require('express-validator');\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = validations => {\n return async (req, res, next) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n"))),(0,i.kt)(s.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"import express from 'express';\nimport { body, validationResult, ValidationChain } from 'express-validator';\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = (validations: ValidationChain[]) => {\n return async (req: express.Request, res: express.Response, next: express.NextFunction) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n")))),(0,i.kt)("h2",{id:"example-validating-with-a-condition"},"Example: validating with a condition"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { body, matchedData } from 'express-validator';\napp.post(\n '/update-settings',\n body('email').isEmail(),\n body('password').optional().isLength({ min: 6 }),\n async (req, res, next) => {\n // if a password has been provided, then a confirmation must also be provided.\n const { password } = matchedData(req);\n if (password) {\n await body('passwordConfirmation')\n .equals(password)\n .withMessage('passwords do not match')\n .run(req);\n }\n\n // Check the validation errors, and update the user's settings.\n },\n);\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This is only an example of how you could use the manual running of validations.\nYou should prefer creating conditional validation chains with the use of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/validation-chain#if"},(0,i.kt)("inlineCode",{parentName:"a"},".if()"))," instead.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b3532997.aacb7d14.js b/assets/js/b3532997.aacb7d14.js new file mode 100644 index 0000000..0bf9294 --- /dev/null +++ b/assets/js/b3532997.aacb7d14.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7035],{5318:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>v});var a=t(7378);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=a.createContext({}),u=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=u(e.components);return a.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(t),m=r,v=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?a.createElement(v,o(o({ref:n},c),{},{components:t})):a.createElement(v,o({ref:n},c))}));function v(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{t.d(n,{Z:()=>o});var a=t(7378),r=t(8944);const i="tabItem_wHwb";function o(e){var n=e.children,t=e.hidden,o=e.className;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i,o),hidden:t},n)}},3930:(e,n,t)=>{t.d(n,{Z:()=>x});var a=t(5773),r=t(7378),i=t(8944),o=t(3457),s=t(3620),l=t(654),u=t(784),c=t(1819);function d(e){return function(e){var n,t;return null!=(n=null==(t=r.Children.map(e,(function(e){if(!e||(0,r.isValidElement)(e)&&(n=e.props)&&"object"==typeof n&&"value"in n)return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function p(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:d(t);return function(e){var n=(0,u.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function v(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,s.k6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:a});return[(0,l._X)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function f(e){var n,t,a,i,o=e.defaultValue,s=e.queryString,l=void 0!==s&&s,u=e.groupId,d=p(e),f=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:d})})),h=f[0],b=f[1],g=v({queryString:l,groupId:u}),y=g[0],w=g[1],k=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,c.Nk)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),x=k[0],E=k[1],N=function(){var e=null!=y?y:x;return m({value:e,tabValues:d})?e:null}();return(0,r.useLayoutEffect)((function(){N&&b(N)}),[N]),{selectedValue:h,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),E(e)}),[w,E,d]),tabValues:d}}var h=t(6457);const b="tabList_J5MA",g="tabItem_l0OV";function y(e){var n=e.className,t=e.block,s=e.selectedValue,l=e.selectValue,u=e.tabValues,c=[],d=(0,o.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var n=e.currentTarget,t=c.indexOf(n),a=u[t].value;a!==s&&(d(n),l(a))},m=function(e){var n,t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;t=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var i,o=c.indexOf(e.currentTarget)-1;t=null!=(i=c[o])?i:c[c.length-1]}null==(n=t)||n.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n)},u.map((function(e){var n=e.value,t=e.label,o=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,key:n,ref:function(e){return c.push(e)},onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",g,null==o?void 0:o.className,{"tabs__item--active":s===n})}),null!=t?t:n)})))}function w(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===a}));return o?(0,r.cloneElement)(o,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})})))}function k(e){var n=f(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b)},r.createElement(y,(0,a.Z)({},e,n)),r.createElement(w,(0,a.Z)({},e,n)))}function x(e){var n=(0,h.Z)();return r.createElement(k,(0,a.Z)({key:String(n)},e))}},7791:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var a=t(5773),r=t(808),i=(t(7378),t(5318)),o=t(3930),s=t(9798),l=["components"],u={title:"Manually running validations"},c=void 0,d={unversionedId:"guides/manually-running",id:"version-7.0.0/guides/manually-running",title:"Manually running validations",description:"express-validator favors the declarative way of doing things that express middlewares bring.",source:"@site/versioned_docs/version-7.0.0/guides/manually-running.md",sourceDirName:"guides",slug:"/guides/manually-running",permalink:"/docs/guides/manually-running",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/versioned_docs/version-7.0.0/guides/manually-running.md",tags:[],version:"7.0.0",frontMatter:{title:"Manually running validations"},sidebar:"docs",previous:{title:"Customizing express-validator",permalink:"/docs/guides/customizing"},next:{title:"Schema validation",permalink:"/docs/guides/schema-validation"}},p={},m=[{value:"Example: creating own validation runner",id:"example-creating-own-validation-runner",level:2},{value:"Example: validating with a condition",id:"example-validating-with-a-condition",level:2}],v={toc:m};function f(e){var n=e.components,t=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},v,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"express-validator favors the declarative way of doing things that express middlewares bring.\nThis means most of the APIs look and work better when simply passed into an express route handler."),(0,i.kt)("p",null,"You can, however, take control of running these validations into your own middleware/route handler."),(0,i.kt)("p",null,"This is possible in express-validator functions which return an object which implements the\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/misc#contextrunner"},(0,i.kt)("inlineCode",{parentName:"a"},"ContextRunner")),", an interface implemented by all of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/validation-chain"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationChain")),", ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/check-exact"},(0,i.kt)("inlineCode",{parentName:"a"},"checkExact()")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/check-schema"},(0,i.kt)("inlineCode",{parentName:"a"},"checkSchema()"))," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/one-of"},(0,i.kt)("inlineCode",{parentName:"a"},"oneOf")),"."),(0,i.kt)("p",null,"Check the examples below to understand how this method can help you:"),(0,i.kt)("h2",{id:"example-creating-own-validation-runner"},"Example: creating own validation runner"),(0,i.kt)(o.Z,{mdxType:"Tabs"},(0,i.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"const express = require('express');\nconst { validationResult } = require('express-validator');\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = validations => {\n return async (req, res, next) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n"))),(0,i.kt)(s.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"import express from 'express';\nimport { body, validationResult, ContextRunner } from 'express-validator';\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = (validations: ContextRunner[]) => {\n return async (req: express.Request, res: express.Response, next: express.NextFunction) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n")))),(0,i.kt)("h2",{id:"example-validating-with-a-condition"},"Example: validating with a condition"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { body, matchedData } from 'express-validator';\napp.post(\n '/update-settings',\n body('email').isEmail(),\n body('password').optional().isLength({ min: 6 }),\n async (req, res, next) => {\n // if a password has been provided, then a confirmation must also be provided.\n const { password } = matchedData(req);\n if (password) {\n await body('passwordConfirmation')\n .equals(password)\n .withMessage('passwords do not match')\n .run(req);\n }\n\n // Check the validation errors, and update the user's settings.\n },\n);\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This is only an example of how you could use the manual running of validations.\nYou should prefer creating conditional validation chains with the use of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/api/validation-chain#if"},(0,i.kt)("inlineCode",{parentName:"a"},".if()"))," instead.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/da63d163.55471bef.js b/assets/js/da63d163.55471bef.js deleted file mode 100644 index f2758b9..0000000 --- a/assets/js/da63d163.55471bef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2413],{7085:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/daaec077.1006f8eb.js b/assets/js/daaec077.743892d9.js similarity index 76% rename from assets/js/daaec077.1006f8eb.js rename to assets/js/daaec077.743892d9.js index 04f1500..e94c984 100644 --- a/assets/js/daaec077.1006f8eb.js +++ b/assets/js/daaec077.743892d9.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8669],{5318:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>f});var a=t(7378);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=a.createContext({}),u=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=u(e.components);return a.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(t),m=r,f=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?a.createElement(f,o(o({ref:n},c),{},{components:t})):a.createElement(f,o({ref:n},c))}));function f(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{t.d(n,{Z:()=>o});var a=t(7378),r=t(8944);const i="tabItem_wHwb";function o(e){var n=e.children,t=e.hidden,o=e.className;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i,o),hidden:t},n)}},3930:(e,n,t)=>{t.d(n,{Z:()=>k});var a=t(5773),r=t(7378),i=t(8944),o=t(3457),s=t(3620),l=t(654),u=t(784),c=t(1819);function d(e){return function(e){var n,t;return null!=(n=null==(t=r.Children.map(e,(function(e){if(!e||(0,r.isValidElement)(e)&&(n=e.props)&&"object"==typeof n&&"value"in n)return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function p(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:d(t);return function(e){var n=(0,u.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,s.k6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:a});return[(0,l._X)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function v(e){var n,t,a,i,o=e.defaultValue,s=e.queryString,l=void 0!==s&&s,u=e.groupId,d=p(e),v=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:d})})),h=v[0],b=v[1],g=f({queryString:l,groupId:u}),y=g[0],w=g[1],x=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,c.Nk)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),k=x[0],E=x[1],N=function(){var e=null!=y?y:k;return m({value:e,tabValues:d})?e:null}();return(0,r.useLayoutEffect)((function(){N&&b(N)}),[N]),{selectedValue:h,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),E(e)}),[w,E,d]),tabValues:d}}var h=t(6457);const b="tabList_J5MA",g="tabItem_l0OV";function y(e){var n=e.className,t=e.block,s=e.selectedValue,l=e.selectValue,u=e.tabValues,c=[],d=(0,o.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var n=e.currentTarget,t=c.indexOf(n),a=u[t].value;a!==s&&(d(n),l(a))},m=function(e){var n,t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;t=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var i,o=c.indexOf(e.currentTarget)-1;t=null!=(i=c[o])?i:c[c.length-1]}null==(n=t)||n.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n)},u.map((function(e){var n=e.value,t=e.label,o=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,key:n,ref:function(e){return c.push(e)},onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",g,null==o?void 0:o.className,{"tabs__item--active":s===n})}),null!=t?t:n)})))}function w(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===a}));return o?(0,r.cloneElement)(o,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})})))}function x(e){var n=v(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b)},r.createElement(y,(0,a.Z)({},e,n)),r.createElement(w,(0,a.Z)({},e,n)))}function k(e){var n=(0,h.Z)();return r.createElement(x,(0,a.Z)({key:String(n)},e))}},9658:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var a=t(5773),r=t(808),i=(t(7378),t(5318)),o=t(3930),s=t(9798),l=["components"],u={title:"Manually running validations"},c=void 0,d={unversionedId:"guides/manually-running",id:"guides/manually-running",title:"Manually running validations",description:"express-validator favors the declarative way of doing things that express middlewares bring.",source:"@site/../docs/guides/manually-running.md",sourceDirName:"guides",slug:"/guides/manually-running",permalink:"/docs/next/guides/manually-running",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/guides/manually-running.md",tags:[],version:"current",frontMatter:{title:"Manually running validations"},sidebar:"docs",previous:{title:"Customizing express-validator",permalink:"/docs/next/guides/customizing"},next:{title:"Schema validation",permalink:"/docs/next/guides/schema-validation"}},p={},m=[{value:"Example: creating own validation runner",id:"example-creating-own-validation-runner",level:2},{value:"Example: validating with a condition",id:"example-validating-with-a-condition",level:2}],f={toc:m};function v(e){var n=e.components,t=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},f,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"express-validator favors the declarative way of doing things that express middlewares bring.\nThis means most of the APIs look and work better when simply passed into an express route handler."),(0,i.kt)("p",null,"You can, however, take control of running these validations into your own middleware/route handler."),(0,i.kt)("p",null,"This is possible in express-validator functions which return an object which implements the\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/misc#contextrunner"},(0,i.kt)("inlineCode",{parentName:"a"},"ContextRunner")),", an interface implemented by all of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationChain")),", ",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/check-exact"},(0,i.kt)("inlineCode",{parentName:"a"},"checkExact()")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/check-schema"},(0,i.kt)("inlineCode",{parentName:"a"},"checkSchema()"))," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,i.kt)("inlineCode",{parentName:"a"},"oneOf")),"."),(0,i.kt)("p",null,"Check the examples below to understand how this method can help you:"),(0,i.kt)("h2",{id:"example-creating-own-validation-runner"},"Example: creating own validation runner"),(0,i.kt)(o.Z,{mdxType:"Tabs"},(0,i.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"const express = require('express');\nconst { validationResult, ValidationChain } = require('express-validator');\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = validations => {\n return async (req, res, next) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n"))),(0,i.kt)(s.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"import express from 'express';\nimport { body, validationResult, ValidationChain } from 'express-validator';\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = (validations: ValidationChain[]) => {\n return async (req: express.Request, res: express.Response, next: express.NextFunction) => {\n for (let validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n")))),(0,i.kt)("h2",{id:"example-validating-with-a-condition"},"Example: validating with a condition"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { body, matchedData } from 'express-validator';\napp.post(\n '/update-settings',\n body('email').isEmail(),\n body('password').optional().isLength({ min: 6 }),\n async (req, res, next) => {\n // if a password has been provided, then a confirmation must also be provided.\n const { password } = matchedData(req);\n if (password) {\n await body('passwordConfirmation')\n .equals(password)\n .withMessage('passwords do not match')\n .run(req);\n }\n\n // Check the validation errors, and update the user's settings.\n },\n);\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This is only an example of how you could use the manual running of validations.\nYou should prefer creating conditional validation chains with the use of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain#if"},(0,i.kt)("inlineCode",{parentName:"a"},".if()"))," instead.")))}v.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8669],{5318:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>f});var a=t(7378);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=a.createContext({}),u=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=u(e.components);return a.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(t),m=r,f=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?a.createElement(f,o(o({ref:n},c),{},{components:t})):a.createElement(f,o({ref:n},c))}));function f(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var u=2;u{t.d(n,{Z:()=>o});var a=t(7378),r=t(8944);const i="tabItem_wHwb";function o(e){var n=e.children,t=e.hidden,o=e.className;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(i,o),hidden:t},n)}},3930:(e,n,t)=>{t.d(n,{Z:()=>k});var a=t(5773),r=t(7378),i=t(8944),o=t(3457),s=t(3620),l=t(654),u=t(784),c=t(1819);function d(e){return function(e){var n,t;return null!=(n=null==(t=r.Children.map(e,(function(e){if(!e||(0,r.isValidElement)(e)&&(n=e.props)&&"object"==typeof n&&"value"in n)return e;var n;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?n:[]}(e).map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes,default:n.default}}))}function p(e){var n=e.values,t=e.children;return(0,r.useMemo)((function(){var e=null!=n?n:d(t);return function(e){var n=(0,u.l)(e,(function(e,n){return e.value===n.value}));if(n.length>0)throw new Error('Docusaurus error: Duplicate values "'+n.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[n,t])}function m(e){var n=e.value;return e.tabValues.some((function(e){return e.value===n}))}function f(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId,i=(0,s.k6)(),o=function(e){var n=e.queryString,t=void 0!==n&&n,a=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:t,groupId:a});return[(0,l._X)(o),(0,r.useCallback)((function(e){if(o){var n=new URLSearchParams(i.location.search);n.set(o,e),i.replace(Object.assign({},i.location,{search:n.toString()}))}}),[o,i])]}function v(e){var n,t,a,i,o=e.defaultValue,s=e.queryString,l=void 0!==s&&s,u=e.groupId,d=p(e),v=(0,r.useState)((function(){return function(e){var n,t=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var r=null!=(n=a.find((function(e){return e.default})))?n:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:o,tabValues:d})})),h=v[0],b=v[1],g=f({queryString:l,groupId:u}),y=g[0],w=g[1],x=(n=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),t=(0,c.Nk)(n),a=t[0],i=t[1],[a,(0,r.useCallback)((function(e){n&&i.set(e)}),[n,i])]),k=x[0],E=x[1],N=function(){var e=null!=y?y:k;return m({value:e,tabValues:d})?e:null}();return(0,r.useLayoutEffect)((function(){N&&b(N)}),[N]),{selectedValue:h,selectValue:(0,r.useCallback)((function(e){if(!m({value:e,tabValues:d}))throw new Error("Can't select invalid tab value="+e);b(e),w(e),E(e)}),[w,E,d]),tabValues:d}}var h=t(6457);const b="tabList_J5MA",g="tabItem_l0OV";function y(e){var n=e.className,t=e.block,s=e.selectedValue,l=e.selectValue,u=e.tabValues,c=[],d=(0,o.o5)().blockElementScrollPositionUntilNextRender,p=function(e){var n=e.currentTarget,t=c.indexOf(n),a=u[t].value;a!==s&&(d(n),l(a))},m=function(e){var n,t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;t=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var i,o=c.indexOf(e.currentTarget)-1;t=null!=(i=c[o])?i:c[c.length-1]}null==(n=t)||n.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n)},u.map((function(e){var n=e.value,t=e.label,o=e.attributes;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,key:n,ref:function(e){return c.push(e)},onKeyDown:m,onClick:p},o,{className:(0,i.Z)("tabs__item",g,null==o?void 0:o.className,{"tabs__item--active":s===n})}),null!=t?t:n)})))}function w(e){var n=e.lazy,t=e.children,a=e.selectedValue,i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){var o=i.find((function(e){return e.props.value===a}));return o?(0,r.cloneElement)(o,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},i.map((function(e,n){return(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})})))}function x(e){var n=v(e);return r.createElement("div",{className:(0,i.Z)("tabs-container",b)},r.createElement(y,(0,a.Z)({},e,n)),r.createElement(w,(0,a.Z)({},e,n)))}function k(e){var n=(0,h.Z)();return r.createElement(x,(0,a.Z)({key:String(n)},e))}},9658:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>v,frontMatter:()=>u,metadata:()=>d,toc:()=>m});var a=t(5773),r=t(808),i=(t(7378),t(5318)),o=t(3930),s=t(9798),l=["components"],u={title:"Manually running validations"},c=void 0,d={unversionedId:"guides/manually-running",id:"guides/manually-running",title:"Manually running validations",description:"express-validator favors the declarative way of doing things that express middlewares bring.",source:"@site/../docs/guides/manually-running.md",sourceDirName:"guides",slug:"/guides/manually-running",permalink:"/docs/next/guides/manually-running",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/guides/manually-running.md",tags:[],version:"current",frontMatter:{title:"Manually running validations"},sidebar:"docs",previous:{title:"Customizing express-validator",permalink:"/docs/next/guides/customizing"},next:{title:"Schema validation",permalink:"/docs/next/guides/schema-validation"}},p={},m=[{value:"Example: creating own validation runner",id:"example-creating-own-validation-runner",level:2},{value:"Example: validating with a condition",id:"example-validating-with-a-condition",level:2}],f={toc:m};function v(e){var n=e.components,t=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},f,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"express-validator favors the declarative way of doing things that express middlewares bring.\nThis means most of the APIs look and work better when simply passed into an express route handler."),(0,i.kt)("p",null,"You can, however, take control of running these validations into your own middleware/route handler."),(0,i.kt)("p",null,"This is possible in express-validator functions which return an object which implements the\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/misc#contextrunner"},(0,i.kt)("inlineCode",{parentName:"a"},"ContextRunner")),", an interface implemented by all of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain"},(0,i.kt)("inlineCode",{parentName:"a"},"ValidationChain")),", ",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/check-exact"},(0,i.kt)("inlineCode",{parentName:"a"},"checkExact()")),",\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/check-schema"},(0,i.kt)("inlineCode",{parentName:"a"},"checkSchema()"))," and ",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,i.kt)("inlineCode",{parentName:"a"},"oneOf")),"."),(0,i.kt)("p",null,"Check the examples below to understand how this method can help you:"),(0,i.kt)("h2",{id:"example-creating-own-validation-runner"},"Example: creating own validation runner"),(0,i.kt)(o.Z,{mdxType:"Tabs"},(0,i.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"const express = require('express');\nconst { validationResult } = require('express-validator');\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = validations => {\n return async (req, res, next) => {\n for (const validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n"))),(0,i.kt)(s.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"import express from 'express';\nimport { body, validationResult, ContextRunner } from 'express-validator';\n// can be reused by many routes\n\n// sequential processing, stops running validations chain if the previous one fails.\nconst validate = (validations: ContextRunner[]) => {\n return async (req: express.Request, res: express.Response, next: express.NextFunction) => {\n for (const validation of validations) {\n const result = await validation.run(req);\n if (result.errors.length) break;\n }\n\n const errors = validationResult(req);\n if (errors.isEmpty()) {\n return next();\n }\n\n res.status(400).json({ errors: errors.array() });\n };\n};\n\napp.post('/signup', validate([\n body('email').isEmail(),\n body('password').isLength({ min: 6 })\n]), async (req, res, next) => {\n // request is guaranteed to not have any validation errors.\n const user = await User.create({ ... });\n});\n")))),(0,i.kt)("h2",{id:"example-validating-with-a-condition"},"Example: validating with a condition"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { body, matchedData } from 'express-validator';\napp.post(\n '/update-settings',\n body('email').isEmail(),\n body('password').optional().isLength({ min: 6 }),\n async (req, res, next) => {\n // if a password has been provided, then a confirmation must also be provided.\n const { password } = matchedData(req);\n if (password) {\n await body('passwordConfirmation')\n .equals(password)\n .withMessage('passwords do not match')\n .run(req);\n }\n\n // Check the validation errors, and update the user's settings.\n },\n);\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This is only an example of how you could use the manual running of validations.\nYou should prefer creating conditional validation chains with the use of\n",(0,i.kt)("a",{parentName:"p",href:"/docs/next/api/validation-chain#if"},(0,i.kt)("inlineCode",{parentName:"a"},".if()"))," instead.")))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/de021951.cf2919d3.js b/assets/js/de021951.bb21e2cb.js similarity index 58% rename from assets/js/de021951.cf2919d3.js rename to assets/js/de021951.bb21e2cb.js index 54ef750..d4ff94b 100644 --- a/assets/js/de021951.cf2919d3.js +++ b/assets/js/de021951.bb21e2cb.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6397],{5318:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(7378);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=u(r),m=n,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||o;return r?a.createElement(f,l(l({ref:t},d),{},{components:r})):a.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var u=2;u{r.d(t,{Z:()=>l});var a=r(7378),n=r(8944);const o="tabItem_wHwb";function l(e){var t=e.children,r=e.hidden,l=e.className;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o,l),hidden:r},t)}},3930:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(5773),n=r(7378),o=r(8944),l=r(3457),i=r(3620),s=r(654),u=r(784),d=r(1819);function p(e){return function(e){var t,r;return null!=(t=null==(r=n.Children.map(e,(function(e){if(!e||(0,n.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function c(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:p(r);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId,o=(0,i.k6)(),l=function(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:r,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function h(e){var t,r,a,o,l=e.defaultValue,i=e.queryString,s=void 0!==i&&i,u=e.groupId,p=c(e),h=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!m({value:r,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var n=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:l,tabValues:p})})),v=h[0],k=h[1],y=f({queryString:s,groupId:u}),g=y[0],b=y[1],N=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Nk)(t),a=r[0],o=r[1],[a,(0,n.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=N[0],E=N[1],T=function(){var e=null!=g?g:w;return m({value:e,tabValues:p})?e:null}();return(0,n.useLayoutEffect)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!m({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);k(e),b(e),E(e)}),[b,E,p]),tabValues:p}}var v=r(6457);const k="tabList_J5MA",y="tabItem_l0OV";function g(e){var t=e.className,r=e.block,i=e.selectedValue,s=e.selectValue,u=e.tabValues,d=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,r=d.indexOf(t),a=u[r].value;a!==i&&(p(t),s(a))},m=function(e){var t,r=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,n=d.indexOf(e.currentTarget)+1;r=null!=(a=d[n])?a:d[0];break;case"ArrowLeft":var o,l=d.indexOf(e.currentTarget)-1;r=null!=(o=d[l])?o:d[d.length-1]}null==(t=r)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},u.map((function(e){var t=e.value,r=e.label,l=e.attributes;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:function(e){return d.push(e)},onKeyDown:m,onClick:c},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":i===t})}),null!=r?r:t)})))}function b(e){var t=e.lazy,r=e.children,a=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===a}));return l?(0,n.cloneElement)(l,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=h(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",k)},n.createElement(g,(0,a.Z)({},e,t)),n.createElement(b,(0,a.Z)({},e,t)))}function w(e){var t=(0,v.Z)();return n.createElement(N,(0,a.Z)({key:String(t)},e))}},1779:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>u,metadata:()=>p,toc:()=>m});var a=r(5773),n=r(808),o=(r(7378),r(5318)),l=r(3930),i=r(9798),s=["components"],u={title:"Errors and Validation Results"},d=void 0,p={unversionedId:"api/validation-result",id:"api/validation-result",title:"Errors and Validation Results",description:"This page contains information about how you can determine if a request has been valid.",source:"@site/../docs/api/validation-result.md",sourceDirName:"api",slug:"/api/validation-result",permalink:"/docs/next/api/validation-result",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/validation-result.md",tags:[],version:"current",frontMatter:{title:"Errors and Validation Results"},sidebar:"api",previous:{title:"matchedData",permalink:"/docs/next/api/matched-data"},next:{title:"Miscellaneous",permalink:"/docs/next/api/misc"}},c={},m=[{value:"validationResult()",id:"validationresult",level:2},{value:"withDefaults()",id:"withdefaults",level:3},{value:"ResultFactory<T>",id:"resultfactory",level:2},{value:"Result<T>",id:"result",level:2},{value:".isEmpty()",id:"isempty",level:3},{value:".formatWith()",id:"formatwith",level:3},{value:".array()",id:"array",level:3},{value:".mapped()",id:"mapped",level:3},{value:".throw()",id:"throw",level:3},{value:"Error types",id:"error-types",level:2},{value:"FieldValidationError",id:"fieldvalidationerror",level:3},{value:"AlternativeValidationError",id:"alternativevalidationerror",level:3},{value:"GroupedAlternativeValidationError",id:"groupedalternativevalidationerror",level:3},{value:"UnknownFieldValidationError",id:"unknownfieldvalidationerror",level:3},{value:"ValidationError",id:"validationerror",level:3},{value:"ErrorFormatter<T>",id:"errorformatter",level:2}],f={toc:m};function h(e){var t=e.components,r=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This page contains information about how you can determine if a request has been valid.\nIt also documents all possible validation error types."),(0,o.kt)("h2",{id:"validationresult"},(0,o.kt)("inlineCode",{parentName:"h2"},"validationResult()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult(req: Request): Result\n")),(0,o.kt)("p",null,"Extracts the validation results from a request, wraps them in a ",(0,o.kt)("a",{parentName:"p",href:"#result"},(0,o.kt)("inlineCode",{parentName:"a"},"Result")," object"),",\nand returns it."),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n")))),(0,o.kt)("h3",{id:"withdefaults"},(0,o.kt)("inlineCode",{parentName:"h3"},"withDefaults()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult.withDefaults(options: { formatter?: ErrorFormatter }): ResultFactory\n")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("inlineCode",{parentName:"p"},"validationResult()"),"-like function that uses the provided options as the defaults in\nthe returned ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object."),(0,o.kt)("p",null,"For example, it's possible to set the default ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter")," of a result like this:"),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\nconst myValidationResult = validationResult.withDefaults({\n formatter: error => error.msg,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors = myValidationResult(req).array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, ResultFactory, validationResult } from 'express-validator';\nconst myValidationResult: ResultFactory = validationResult.withDefaults({\n formatter: error => error.msg as string,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors: string[] = myValidationResult(req).array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h2",{id:"resultfactory"},(0,o.kt)("inlineCode",{parentName:"h2"},"ResultFactory")),(0,o.kt)("h2",{id:"result"},(0,o.kt)("inlineCode",{parentName:"h2"},"Result")),(0,o.kt)("p",null,"The result object is a wrapper around the validation state of a request.\nIt provides a couple of methods that you can use to determine if the request is valid or not."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The type parameter ",(0,o.kt)("inlineCode",{parentName:"p"},"T")," refers to the type that errors as returned by methods such as\n",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},".array()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},".mapped()"))," will have."),(0,o.kt)("p",{parentName:"admonition"},"Its default is ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")),", which can be changed by using ",(0,o.kt)("a",{parentName:"p",href:"#formatwith"},(0,o.kt)("inlineCode",{parentName:"a"},".formatWith()")),".")),(0,o.kt)("h3",{id:"isempty"},(0,o.kt)("inlineCode",{parentName:"h3"},".isEmpty()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(): boolean\n")),(0,o.kt)("p",null,"Returns whether the request contains validation errors, and thefore whether it's valid or not."),(0,o.kt)("h3",{id:"formatwith"},(0,o.kt)("inlineCode",{parentName:"h3"},".formatWith()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"formatWith(formatter: ErrorFormatter): Result\n")),(0,o.kt)("p",null,"Rewraps the validation state in a new ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object that uses ",(0,o.kt)("inlineCode",{parentName:"p"},"formatter")," as its ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter"),"."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"\ud83d\udcad Why does this method return a new Result?"),(0,o.kt)("p",null,"If you've read through other pages of this documentation, you might be asking yourself why can't\n",(0,o.kt)("inlineCode",{parentName:"p"},".formatWith()")," mutate itself, like validation chains do?"),(0,o.kt)("p",null,"The reason for this is simple: TypeScript.",(0,o.kt)("br",null),"\nIt's not possible to change the generic type of an existing object. If some code references the\nresult as ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ error: string }>"),", but after ",(0,o.kt)("inlineCode",{parentName:"p"},"formatWith")," it's now actually ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ message: string }>"),",\nsome code consuming the old ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type would not get compile-time errors about the type mismatch.")),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2 = result.formatWith(error => error.msg);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2: Result = result.formatWith(error => error.msg as string);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h3",{id:"array"},(0,o.kt)("inlineCode",{parentName:"h3"},".array()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"array(options?: { onlyFirstError?: boolean }): T[]\n")),(0,o.kt)("p",null,"Returns a list of all errors from all validated fields."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array();\n// => [{ msg: 'Invalid value', path: 'field1' }, { msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("p",null,"When ",(0,o.kt)("inlineCode",{parentName:"p"},"options.onlyFirstError")," is set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),", then only the first error of each field is returned:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array({ onlyFirstError: true });\n// => [{ msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("h3",{id:"mapped"},(0,o.kt)("inlineCode",{parentName:"h3"},".mapped()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"mapped(): Record\n")),(0,o.kt)("p",null,"Returns an object from field path to error.\nIf a field has multiple errors, only the first one is returned."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).mapped();\n// => { field1: { msg: 'Invalid value', ... }, field2: { msg: 'Invalid value', ... } }\n")),(0,o.kt)("h3",{id:"throw"},(0,o.kt)("inlineCode",{parentName:"h3"},".throw()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"throw(): void\n")),(0,o.kt)("p",null,"If the result object has errors, then this method throws an error decorated with the same methods as\nthe ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type.",(0,o.kt)("br",null),"\nThis is useful if you wish to forward the errors to the error handler middleware of your express.js\napplication, for example."),(0,o.kt)("p",null,"If the result object has no errors, then this method does nothing."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/hello', query('person').notEmpty(), (req, res) => {\n try {\n validationResult(req).throw();\n res.send(`Hello, ${req.query.person}!`);\n } catch (e) {\n res.status(400).send({ errors: e.mapped() });\n }\n});\n")),(0,o.kt)("h2",{id:"error-types"},"Error types"),(0,o.kt)("p",null,"Different APIs in express-validator cause different types of validation errors.\nAll of them are documented here:"),(0,o.kt)("h3",{id:"fieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"FieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type FieldValidationError = {\n type: 'field';\n location: Location;\n path: string;\n value: any;\n msg: any;\n};\n")),(0,o.kt)("p",null,"Represents an error caused when validating a single field, simple as that."),(0,o.kt)("h3",{id:"alternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"AlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative';\n msg: any;\n nestedErrors: FieldValidationError[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains a flat list of the individual field errors."),(0,o.kt)("h3",{id:"groupedalternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"GroupedAlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative_grouped';\n msg: any;\n nestedErrors: FieldValidationError[][];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains the list of the individual field errors, grouped by the alternative."),(0,o.kt)("h3",{id:"unknownfieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"UnknownFieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type UnknownFieldsError = {\n type: 'unknown_fields';\n msg: any;\n fields: { path: string; location: Location; value: any }[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when one or more fields are unknown; that is, they didn't have a validation\nchain when ",(0,o.kt)("inlineCode",{parentName:"p"},"checkExact()")," kicked off.\n",(0,o.kt)("inlineCode",{parentName:"p"},"fields")," contains the list of all unknown fields' paths, locations and values."),(0,o.kt)("h3",{id:"validationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"ValidationError")),(0,o.kt)("p",null,"Any of the validation errors.\nIt's possible to determine what the error actually is by looking at its ",(0,o.kt)("inlineCode",{parentName:"p"},"type")," property:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"switch (error.type) {\n case 'field':\n // `error` is a `FieldValidationError`\n console.log(error.path, error.location, error.value);\n break;\n\n case 'alternative':\n // `error` is an `AlternativeValidationError`\n console.log(error.nestedErrors);\n break;\n\n case 'alternative_grouped':\n // `error` is a `GroupedAlternativeValidationError`\n error.nestedErrors.forEach((nestedErrors, i) => {\n console.log(`Errors from chain ${i}:`);\n console.log(nestedErrors);\n });\n break;\n\n case 'unknown_fields':\n // `error` is an `UnknownFieldsError`\n console.log(error.fields);\n break;\n\n default:\n // Error is not any of the known types! Do something else.\n throw new Error(`Unknown error type ${error.type}`);\n}\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you're using TypeScript, this technique is known as ",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions"},"discriminated unions"),".")),(0,o.kt)("h2",{id:"errorformatter"},(0,o.kt)("inlineCode",{parentName:"h2"},"ErrorFormatter")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type ErrorFormatter = (error: ValidationError) => T;\n")),(0,o.kt)("p",null,"A function used to format errors returned by methods such as ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#mapped()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#array()")),".\nIt takes the ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},"unformatted error")," and must return a new value."))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6397],{5318:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var a=r(7378);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),u=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=u(r),m=n,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||o;return r?a.createElement(f,l(l({ref:t},d),{},{components:r})):a.createElement(f,l({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var u=2;u{r.d(t,{Z:()=>l});var a=r(7378),n=r(8944);const o="tabItem_wHwb";function l(e){var t=e.children,r=e.hidden,l=e.className;return a.createElement("div",{role:"tabpanel",className:(0,n.Z)(o,l),hidden:r},t)}},3930:(e,t,r)=>{r.d(t,{Z:()=>w});var a=r(5773),n=r(7378),o=r(8944),l=r(3457),i=r(3620),s=r(654),u=r(784),d=r(1819);function p(e){return function(e){var t,r;return null!=(t=null==(r=n.Children.map(e,(function(e){if(!e||(0,n.isValidElement)(e)&&(t=e.props)&&"object"==typeof t&&"value"in t)return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function c(e){var t=e.values,r=e.children;return(0,n.useMemo)((function(){var e=null!=t?t:p(r);return function(e){var t=(0,u.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,r])}function m(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId,o=(0,i.k6)(),l=function(e){var t=e.queryString,r=void 0!==t&&t,a=e.groupId;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:r,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((function(e){if(l){var t=new URLSearchParams(o.location.search);t.set(l,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[l,o])]}function h(e){var t,r,a,o,l=e.defaultValue,i=e.queryString,s=void 0!==i&&i,u=e.groupId,p=c(e),h=(0,n.useState)((function(){return function(e){var t,r=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!m({value:r,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}var n=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:l,tabValues:p})})),v=h[0],k=h[1],y=f({queryString:s,groupId:u}),g=y[0],b=y[1],N=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:u}.groupId),r=(0,d.Nk)(t),a=r[0],o=r[1],[a,(0,n.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=N[0],E=N[1],T=function(){var e=null!=g?g:w;return m({value:e,tabValues:p})?e:null}();return(0,n.useLayoutEffect)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,n.useCallback)((function(e){if(!m({value:e,tabValues:p}))throw new Error("Can't select invalid tab value="+e);k(e),b(e),E(e)}),[b,E,p]),tabValues:p}}var v=r(6457);const k="tabList_J5MA",y="tabItem_l0OV";function g(e){var t=e.className,r=e.block,i=e.selectedValue,s=e.selectValue,u=e.tabValues,d=[],p=(0,l.o5)().blockElementScrollPositionUntilNextRender,c=function(e){var t=e.currentTarget,r=d.indexOf(t),a=u[r].value;a!==i&&(p(t),s(a))},m=function(e){var t,r=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var a,n=d.indexOf(e.currentTarget)+1;r=null!=(a=d[n])?a:d[0];break;case"ArrowLeft":var o,l=d.indexOf(e.currentTarget)-1;r=null!=(o=d[l])?o:d[d.length-1]}null==(t=r)||t.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},u.map((function(e){var t=e.value,r=e.label,l=e.attributes;return n.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:function(e){return d.push(e)},onKeyDown:m,onClick:c},l,{className:(0,o.Z)("tabs__item",y,null==l?void 0:l.className,{"tabs__item--active":i===t})}),null!=r?r:t)})))}function b(e){var t=e.lazy,r=e.children,a=e.selectedValue,o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){var l=o.find((function(e){return e.props.value===a}));return l?(0,n.cloneElement)(l,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},o.map((function(e,t){return(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=h(e);return n.createElement("div",{className:(0,o.Z)("tabs-container",k)},n.createElement(g,(0,a.Z)({},e,t)),n.createElement(b,(0,a.Z)({},e,t)))}function w(e){var t=(0,v.Z)();return n.createElement(N,(0,a.Z)({key:String(t)},e))}},1779:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>u,metadata:()=>p,toc:()=>m});var a=r(5773),n=r(808),o=(r(7378),r(5318)),l=r(3930),i=r(9798),s=["components"],u={title:"Errors and Validation Results"},d=void 0,p={unversionedId:"api/validation-result",id:"api/validation-result",title:"Errors and Validation Results",description:"This page contains information about how you can determine if a request has been valid.",source:"@site/../docs/api/validation-result.md",sourceDirName:"api",slug:"/api/validation-result",permalink:"/docs/next/api/validation-result",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/validation-result.md",tags:[],version:"current",frontMatter:{title:"Errors and Validation Results"},sidebar:"api",previous:{title:"matchedData",permalink:"/docs/next/api/matched-data"},next:{title:"Miscellaneous",permalink:"/docs/next/api/misc"}},c={},m=[{value:"validationResult()",id:"validationresult",level:2},{value:"withDefaults()",id:"withdefaults",level:3},{value:"ResultFactory<T>",id:"resultfactory",level:2},{value:"Result<T>",id:"result",level:2},{value:".isEmpty()",id:"isempty",level:3},{value:".formatWith()",id:"formatwith",level:3},{value:".array()",id:"array",level:3},{value:".mapped()",id:"mapped",level:3},{value:".throw()",id:"throw",level:3},{value:"Error types",id:"error-types",level:2},{value:"FieldValidationError",id:"fieldvalidationerror",level:3},{value:"AlternativeValidationError",id:"alternativevalidationerror",level:3},{value:"GroupedAlternativeValidationError",id:"groupedalternativevalidationerror",level:3},{value:"UnknownFieldValidationError",id:"unknownfieldvalidationerror",level:3},{value:"ValidationError",id:"validationerror",level:3},{value:"ErrorFormatter<T>",id:"errorformatter",level:2}],f={toc:m};function h(e){var t=e.components,r=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This page contains information about how you can determine if a request has been valid.\nIt also documents all possible validation error types."),(0,o.kt)("h2",{id:"validationresult"},(0,o.kt)("inlineCode",{parentName:"h2"},"validationResult()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult(req: Request): Result\n")),(0,o.kt)("p",null,"Extracts the validation results from a request, wraps them in a ",(0,o.kt)("a",{parentName:"p",href:"#result"},(0,o.kt)("inlineCode",{parentName:"a"},"Result")," object"),",\nand returns it."),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n // Use `result` to figure out if the request is valid or not\n});\n")))),(0,o.kt)("h3",{id:"withdefaults"},(0,o.kt)("inlineCode",{parentName:"h3"},"withDefaults()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"validationResult.withDefaults(options: { formatter?: ErrorFormatter }): ResultFactory\n")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("inlineCode",{parentName:"p"},"validationResult()"),"-like function that uses the provided options as the defaults in\nthe returned ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object."),(0,o.kt)("p",null,"For example, it's possible to set the default ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter")," of a result like this:"),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\nconst myValidationResult = validationResult.withDefaults({\n formatter: error => error.msg,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors = myValidationResult(req).array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, ResultFactory, validationResult } from 'express-validator';\nconst myValidationResult: ResultFactory = validationResult.withDefaults({\n formatter: error => error.msg as string,\n});\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const errors: string[] = myValidationResult(req).array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h2",{id:"resultfactory"},(0,o.kt)("inlineCode",{parentName:"h2"},"ResultFactory")),(0,o.kt)("h2",{id:"result"},(0,o.kt)("inlineCode",{parentName:"h2"},"Result")),(0,o.kt)("p",null,"The result object is a wrapper around the validation state of a request.\nIt provides a couple of methods that you can use to determine if the request is valid or not."),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The type parameter ",(0,o.kt)("inlineCode",{parentName:"p"},"T")," refers to the type that errors as returned by methods such as\n",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},".array()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},".mapped()"))," will have."),(0,o.kt)("p",{parentName:"admonition"},"Its default is ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},(0,o.kt)("inlineCode",{parentName:"a"},"ValidationError")),", which can be changed by using ",(0,o.kt)("a",{parentName:"p",href:"#formatwith"},(0,o.kt)("inlineCode",{parentName:"a"},".formatWith()")),".")),(0,o.kt)("h3",{id:"isempty"},(0,o.kt)("inlineCode",{parentName:"h3"},".isEmpty()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(): boolean\n")),(0,o.kt)("p",null,"Returns whether the request contains validation errors, and therefore whether it's valid or not."),(0,o.kt)("h3",{id:"formatwith"},(0,o.kt)("inlineCode",{parentName:"h3"},".formatWith()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"formatWith(formatter: ErrorFormatter): Result\n")),(0,o.kt)("p",null,"Rewraps the validation state in a new ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," object that uses ",(0,o.kt)("inlineCode",{parentName:"p"},"formatter")," as its ",(0,o.kt)("a",{parentName:"p",href:"#errorformatter"},"error formatter"),"."),(0,o.kt)("details",null,(0,o.kt)("summary",null,"\ud83d\udcad Why does this method return a new Result?"),(0,o.kt)("p",null,"If you've read through other pages of this documentation, you might be asking yourself why can't\n",(0,o.kt)("inlineCode",{parentName:"p"},".formatWith()")," mutate itself, like validation chains do?"),(0,o.kt)("p",null,"The reason for this is simple: TypeScript.",(0,o.kt)("br",null),"\nIt's not possible to change the generic type of an existing object. If some code references the\nresult as ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ error: string }>"),", but after ",(0,o.kt)("inlineCode",{parentName:"p"},"formatWith")," it's now actually ",(0,o.kt)("inlineCode",{parentName:"p"},"Result<{ message: string }>"),",\nsome code consuming the old ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type would not get compile-time errors about the type mismatch.")),(0,o.kt)(l.Z,{groupId:"lang",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const { query, validationResult } = require('express-validator');\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2 = result.formatWith(error => error.msg);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n"))),(0,o.kt)(i.Z,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { query, Result, validationResult } from 'express-validator';\n\napp.post('/hello', query('person').notEmpty(), (req, res) => {\n const result: Result = validationResult(req);\n const errors = result.array();\n // => [{ msg: 'Invalid value', ... }]\n\n const result2: Result = result.formatWith(error => error.msg as string);\n const errors2 = result2.array();\n // => ['Invalid value']\n});\n")))),(0,o.kt)("h3",{id:"array"},(0,o.kt)("inlineCode",{parentName:"h3"},".array()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"array(options?: { onlyFirstError?: boolean }): T[]\n")),(0,o.kt)("p",null,"Returns a list of all errors from all validated fields."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array();\n// => [{ msg: 'Invalid value', path: 'field1' }, { msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("p",null,"When ",(0,o.kt)("inlineCode",{parentName:"p"},"options.onlyFirstError")," is set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),", then only the first error of each field is returned:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).array({ onlyFirstError: true });\n// => [{ msg: 'Invalid value', path: 'field1' }]\n")),(0,o.kt)("h3",{id:"mapped"},(0,o.kt)("inlineCode",{parentName:"h3"},".mapped()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"mapped(): Record\n")),(0,o.kt)("p",null,"Returns an object from field path to error.\nIf a field has multiple errors, only the first one is returned."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const result = validationResult(req).mapped();\n// => { field1: { msg: 'Invalid value', ... }, field2: { msg: 'Invalid value', ... } }\n")),(0,o.kt)("h3",{id:"throw"},(0,o.kt)("inlineCode",{parentName:"h3"},".throw()")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"throw(): void\n")),(0,o.kt)("p",null,"If the result object has errors, then this method throws an error decorated with the same methods as\nthe ",(0,o.kt)("inlineCode",{parentName:"p"},"Result")," type.",(0,o.kt)("br",null),"\nThis is useful if you wish to forward the errors to the error handler middleware of your express.js\napplication, for example."),(0,o.kt)("p",null,"If the result object has no errors, then this method does nothing."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/hello', query('person').notEmpty(), (req, res) => {\n try {\n validationResult(req).throw();\n res.send(`Hello, ${req.query.person}!`);\n } catch (e) {\n res.status(400).send({ errors: e.mapped() });\n }\n});\n")),(0,o.kt)("h2",{id:"error-types"},"Error types"),(0,o.kt)("p",null,"Different APIs in express-validator cause different types of validation errors.\nAll of them are documented here:"),(0,o.kt)("h3",{id:"fieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"FieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type FieldValidationError = {\n type: 'field';\n location: Location;\n path: string;\n value: any;\n msg: any;\n};\n")),(0,o.kt)("p",null,"Represents an error caused when validating a single field, simple as that."),(0,o.kt)("h3",{id:"alternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"AlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative';\n msg: any;\n nestedErrors: FieldValidationError[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains a flat list of the individual field errors."),(0,o.kt)("h3",{id:"groupedalternativevalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"GroupedAlternativeValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type AlternativeValidationError = {\n type: 'alternative_grouped';\n msg: any;\n nestedErrors: FieldValidationError[][];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when all alternatives (e.g. in ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,o.kt)("inlineCode",{parentName:"a"},"oneOf()")),") were invalid.\n",(0,o.kt)("inlineCode",{parentName:"p"},"nestedErrors")," contains the list of the individual field errors, grouped by the alternative."),(0,o.kt)("h3",{id:"unknownfieldvalidationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"UnknownFieldValidationError")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type UnknownFieldsError = {\n type: 'unknown_fields';\n msg: any;\n fields: { path: string; location: Location; value: any }[];\n};\n")),(0,o.kt)("p",null,"Represents an error caused when one or more fields are unknown; that is, they didn't have a validation\nchain when ",(0,o.kt)("inlineCode",{parentName:"p"},"checkExact()")," kicked off.\n",(0,o.kt)("inlineCode",{parentName:"p"},"fields")," contains the list of all unknown fields' paths, locations and values."),(0,o.kt)("h3",{id:"validationerror"},(0,o.kt)("inlineCode",{parentName:"h3"},"ValidationError")),(0,o.kt)("p",null,"Any of the validation errors.\nIt's possible to determine what the error actually is by looking at its ",(0,o.kt)("inlineCode",{parentName:"p"},"type")," property:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"switch (error.type) {\n case 'field':\n // `error` is a `FieldValidationError`\n console.log(error.path, error.location, error.value);\n break;\n\n case 'alternative':\n // `error` is an `AlternativeValidationError`\n console.log(error.nestedErrors);\n break;\n\n case 'alternative_grouped':\n // `error` is a `GroupedAlternativeValidationError`\n error.nestedErrors.forEach((nestedErrors, i) => {\n console.log(`Errors from chain ${i}:`);\n console.log(nestedErrors);\n });\n break;\n\n case 'unknown_fields':\n // `error` is an `UnknownFieldsError`\n console.log(error.fields);\n break;\n\n default:\n // Error is not any of the known types! Do something else.\n throw new Error(`Unknown error type ${error.type}`);\n}\n")),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"If you're using TypeScript, this technique is known as ",(0,o.kt)("a",{parentName:"p",href:"https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions"},"discriminated unions"),".")),(0,o.kt)("h2",{id:"errorformatter"},(0,o.kt)("inlineCode",{parentName:"h2"},"ErrorFormatter")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"type ErrorFormatter = (error: ValidationError) => T;\n")),(0,o.kt)("p",null,"A function used to format errors returned by methods such as ",(0,o.kt)("a",{parentName:"p",href:"#mapped"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#mapped()"))," and ",(0,o.kt)("a",{parentName:"p",href:"#array"},(0,o.kt)("inlineCode",{parentName:"a"},"Result#array()")),".\nIt takes the ",(0,o.kt)("a",{parentName:"p",href:"#validationerror"},"unformatted error")," and must return a new value."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f0dd6a1c.4fad6916.js b/assets/js/f0dd6a1c.4fad6916.js deleted file mode 100644 index 63ee94b..0000000 --- a/assets/js/f0dd6a1c.4fad6916.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1185],{5318:(e,a,n)=>{n.d(a,{Zo:()=>m,kt:()=>u});var t=n(7378);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),d=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},m=function(e){var a=d(e.components);return t.createElement(p.Provider,{value:a},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},N=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),k=d(n),N=i,u=k["".concat(p,".").concat(N)]||k[N]||s[N]||l;return n?t.createElement(u,r(r({ref:a},m),{},{components:n})):t.createElement(u,r({ref:a},m))}));function u(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=N;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[k]="string"==typeof e?e:i,r[1]=o;for(var d=2;d{n.r(a),n.d(a,{assets:()=>C,contentTitle:()=>u,default:()=>v,frontMatter:()=>N,metadata:()=>c,toc:()=>h});var t=n(5773),i=n(808),l=(n(7378),n(5318)),r=["components"],o={toc:[{value:"contains()",id:"contains",level:4},{value:"equals()",id:"equals",level:4},{value:"isAfter()",id:"isafter",level:4},{value:"isAlpha()",id:"isalpha",level:4},{value:"isAlphanumeric()",id:"isalphanumeric",level:4},{value:"isAscii()",id:"isascii",level:4},{value:"isBase32()",id:"isbase32",level:4},{value:"isBase58()",id:"isbase58",level:4},{value:"isBase64()",id:"isbase64",level:4},{value:"isBefore()",id:"isbefore",level:4},{value:"isBIC()",id:"isbic",level:4},{value:"isBoolean()",id:"isboolean",level:4},{value:"isBtcAddress()",id:"isbtcaddress",level:4},{value:"isByteLength()",id:"isbytelength",level:4},{value:"isCreditCard()",id:"iscreditcard",level:4},{value:"isCurrency()",id:"iscurrency",level:4},{value:"isDataURI()",id:"isdatauri",level:4},{value:"isDate()",id:"isdate",level:4},{value:"isDecimal()",id:"isdecimal",level:4},{value:"isDivisibleBy()",id:"isdivisibleby",level:4},{value:"isEAN()",id:"isean",level:4},{value:"isEmail()",id:"isemail",level:4},{value:"isEmpty()",id:"isempty",level:4},{value:"isEthereumAddress()",id:"isethereumaddress",level:4},{value:"isFQDN()",id:"isfqdn",level:4},{value:"isFloat()",id:"isfloat",level:4},{value:"isFullWidth()",id:"isfullwidth",level:4},{value:"isHalfWidth()",id:"ishalfwidth",level:4},{value:"isHash()",id:"ishash",level:4},{value:"isHexColor()",id:"ishexcolor",level:4},{value:"isHexadecimal()",id:"ishexadecimal",level:4},{value:"isHSL()",id:"ishsl",level:4},{value:"isIBAN()",id:"isiban",level:4},{value:"isIdentityCard()",id:"isidentitycard",level:4},{value:"isIMEI()",id:"isimei",level:4},{value:"isIP()",id:"isip",level:4},{value:"isIPRange()",id:"isiprange",level:4},{value:"isISBN()",id:"isisbn",level:4},{value:"isISSN()",id:"isissn",level:4},{value:"isISIN()",id:"isisin",level:4},{value:"isISO6391()",id:"isiso6391",level:4},{value:"isISO8601()",id:"isiso8601",level:4},{value:"isISO31661Alpha2()",id:"isiso31661alpha2",level:4},{value:"isISO31661Alpha3()",id:"isiso31661alpha3",level:4},{value:"isISO4217()",id:"isiso4217",level:4},{value:"isISRC()",id:"isisrc",level:4},{value:"isIn()",id:"isin",level:4},{value:"isInt()",id:"isint",level:4},{value:"isJSON()",id:"isjson",level:4},{value:"isJWT()",id:"isjwt",level:4},{value:"isLatLong()",id:"islatlong",level:4},{value:"isLength()",id:"islength",level:4},{value:"isLicensePlate()",id:"islicenseplate",level:4},{value:"isLocale()",id:"islocale",level:4},{value:"isLowercase()",id:"islowercase",level:4},{value:"isLuhnNumber()",id:"isluhnnumber",level:4},{value:"isMagnetURI()",id:"ismagneturi",level:4},{value:"isMACAddress()",id:"ismacaddress",level:4},{value:"isMD5()",id:"ismd5",level:4},{value:"isMimeType()",id:"ismimetype",level:4},{value:"isMobilePhone()",id:"ismobilephone",level:4},{value:"isMongoId()",id:"ismongoid",level:4},{value:"isMultibyte()",id:"ismultibyte",level:4},{value:"isNumeric()",id:"isnumeric",level:4},{value:"isOctal()",id:"isoctal",level:4},{value:"isPassportNumber()",id:"ispassportnumber",level:4},{value:"isPort()",id:"isport",level:4},{value:"isPostalCode()",id:"ispostalcode",level:4},{value:"isRgbColor()",id:"isrgbcolor",level:4},{value:"isRFC3339()",id:"isrfc3339",level:4},{value:"isSemVer()",id:"issemver",level:4},{value:"isSlug()",id:"isslug",level:4},{value:"isStrongPassword()",id:"isstrongpassword",level:4},{value:"isSurrogatePair()",id:"issurrogatepair",level:4},{value:"isTaxID()",id:"istaxid",level:4},{value:"isTime()",id:"istime",level:4},{value:"isURL()",id:"isurl",level:4},{value:"isUUID()",id:"isuuid",level:4},{value:"isUppercase()",id:"isuppercase",level:4},{value:"isVariableWidth()",id:"isvariablewidth",level:4},{value:"isVAT()",id:"isvat",level:4},{value:"isWhitelisted()",id:"iswhitelisted",level:4},{value:"matches()",id:"matches",level:4}]};function p(e){var a=e.components,n=(0,i.Z)(e,r);return(0,l.kt)("wrapper",(0,t.Z)({},o,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"contains"},(0,l.kt)("inlineCode",{parentName:"h4"},"contains()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"contains(elem: any, options?: {\n ignoreCase?: boolean;\n minOccurrences?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"equals"},(0,l.kt)("inlineCode",{parentName:"h4"},"equals()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"equals(comparison: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isafter"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAfter()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAfter(dateOrOptions?: string | {\n comparisonDate?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isalpha"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlpha()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlpha(locale?: AlphaLocale, options?: {\n ignore?: string | string[] | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphaLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isalphanumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlphanumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlphanumeric(locale?: AlphanumericLocale, options?: {\n ignore?: string | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphanumericLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isascii"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAscii()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAscii(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase32"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase32()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase32(options?: {\n crockford?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase58"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase58()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase58(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase64"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase64()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase64(options?: {\n urlSafe?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbefore"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBefore()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBefore(date?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isbic"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBIC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBIC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBoolean(options?: {\n strict?: boolean;\n loose?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbtcaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBtcAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBtcAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbytelength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isByteLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isByteLength(options: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscreditcard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCreditCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCreditCard(options?: {\n provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscurrency"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCurrency()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCurrency(options?: {\n symbol?: string;\n require_symbol?: boolean;\n allow_space_after_symbol?: boolean;\n symbol_after_digits?: boolean;\n allow_negatives?: boolean;\n parens_for_negatives?: boolean;\n negative_sign_before_digits?: boolean;\n negative_sign_after_digits?: boolean;\n allow_negative_sign_placeholder?: boolean;\n thousands_separator?: string;\n decimal_separator?: string;\n allow_decimal?: boolean;\n require_decimal?: boolean;\n digits_after_decimal?: number[];\n allow_space_after_digits?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdatauri"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDataURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDataURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"isdate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDate(options?: {\n format?: string;\n delimiters?: string[];\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDecimal(options?: {\n decimal_digits?: string;\n force_decimal?: boolean;\n locale?: AlphanumericLocale;\n blacklisted_chars?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdivisibleby"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDivisibleBy()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDivisibleBy(number: number): ValidationChain\n")),(0,l.kt)("h4",{id:"isean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmail(options?: {\n allow_display_name?: boolean;\n allow_utf8_local_part?: boolean;\n require_tld?: boolean;\n ignore_max_length?: boolean;\n allow_ip_domain?: boolean;\n domain_specific_validation?: boolean;\n blacklisted_chars?: string;\n host_blacklist?: string[];\n host_whitelist?: string[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isempty"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(options?: {\n ignore_whitespace: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isethereumaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEthereumAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEthereumAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isfqdn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFQDN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFQDN(options?: {\n require_tld?: boolean;\n allow_underscores?: boolean;\n allow_trailing_dot?: boolean;\n allow_numeric_tld?: boolean;\n allow_wildcard?: boolean;\n ignore_max_length?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFloat(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfullwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFullWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFullWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishalfwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHalfWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHalfWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishash"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHash()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHash(algorithm: HashAlgorithm): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of HashAlgorithm"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha256'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha384'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha512'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger192'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32b'")))),(0,l.kt)("h4",{id:"ishexcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexColor(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishexadecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexadecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexadecimal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishsl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHSL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHSL(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiban"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIBAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIBAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isidentitycard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIdentityCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIdentityCard(locale?: IdentityCardLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IdentityCardLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hk-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"isimei"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIMEI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIMEI(options?: {\n allow_hyphens?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isip"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIP()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIP(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isiprange"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIPRange()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIPRange(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isisbn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISBN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISBN(versionOrOptions?: number | {\n version?: '10' | '13';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isissn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISSN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISSN(options?: {\n case_sensitive?: boolean;\n require_hyphen?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isisin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISIN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISIN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso6391"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO6391()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO6391(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso8601"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO8601()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO8601(options?: {\n strict?: boolean;\n strictSeparator?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha2"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha2()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha2(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha3"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha3()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha3(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso4217"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO4217()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO4217(): ValidationChain\n")),(0,l.kt)("h4",{id:"isisrc"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISRC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISRC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIn()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIn(values: readonly any[]): ValidationChain\n")),(0,l.kt)("h4",{id:"isint"},(0,l.kt)("inlineCode",{parentName:"h4"},"isInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isInt(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n allow_leading_zeroes?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjson"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJSON()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJSON(options?: {\n allow_primitives?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjwt"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJWT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJWT(): ValidationChain\n")),(0,l.kt)("h4",{id:"islatlong"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLatLong()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLatLong(options?: {\n checkDMS?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLength(options: {\n min?: number;\n max?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islicenseplate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLicensePlate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLicensePlate(locale: IsLicensePlateLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IsLicensePlateLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")))),(0,l.kt)("h4",{id:"islocale"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLocale()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLocale(): ValidationChain\n")),(0,l.kt)("h4",{id:"islowercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLowercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLowercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isluhnnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLuhnNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLuhnNumber(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismagneturi"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMagnetURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMagnetURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismacaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMACAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMACAddress(options?: {\n no_separators?: boolean;\n no_colons?: boolean;\n eui?: '48' | '64';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"ismd5"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMD5()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMD5(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismimetype"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMimeType()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMimeType(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismobilephone"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMobilePhone()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMobilePhone(locale: MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: {\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of MobilePhoneLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'am-AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-OM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-PS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'be-BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bs-BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dv-MV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dz-BT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-LS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-RW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-TZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-UG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-VE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fj-FJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fo-FO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-MQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-PF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-RE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ga-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ir-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ka-GE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kl-GL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ky-KG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mg-MG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mn-MN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ms-MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'my-MM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mz-MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-AW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ne-NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-AO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-MD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tg-TJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tk-TM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uz-Uz'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"ismongoid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMongoId()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMongoId(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismultibyte"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMultibyte()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMultibyte(): ValidationChain\n")),(0,l.kt)("h4",{id:"isnumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isNumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isNumeric(options?: {\n no_symbols: boolean;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isoctal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isOctal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isOctal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispassportnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPassportNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPassportNumber(countryCode?: PassportCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PassportCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")))),(0,l.kt)("h4",{id:"isport"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPort()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPort(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispostalcode"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPostalCode()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPostalCode(locale: PostalCodeLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PostalCodeLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZM'")))),(0,l.kt)("h4",{id:"isrgbcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRgbColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRgbColor(includePercentValues?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"isrfc3339"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRFC3339()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRFC3339(): ValidationChain\n")),(0,l.kt)("h4",{id:"issemver"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSemVer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSemVer(): ValidationChain\n")),(0,l.kt)("h4",{id:"isslug"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSlug()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSlug(): ValidationChain\n")),(0,l.kt)("h4",{id:"isstrongpassword"},(0,l.kt)("inlineCode",{parentName:"h4"},"isStrongPassword()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isStrongPassword(options?: {\n minLength?: number;\n minLowercase?: number;\n minUppercase?: number;\n minNumbers?: number;\n minSymbols?: number;\n returnScore?: boolean;\n pointsPerUnique?: number;\n pointsPerRepeat?: number;\n pointsForContainingLower?: number;\n pointsForContainingUpper?: number;\n pointsForContainingNumber?: number;\n pointsForContainingSymbol?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"issurrogatepair"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSurrogatePair()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSurrogatePair(): ValidationChain\n")),(0,l.kt)("h4",{id:"istaxid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTaxID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTaxID(locale: TaxIDLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of TaxIDLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dk-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hr-HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lb-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mt-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")))),(0,l.kt)("h4",{id:"istime"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTime()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTime(options: {\n hourFormat?: 'hour24' | 'hour12';\n mode?: 'default' | 'withSeconds';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isurl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isURL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isURL(options?: {\n protocols?: URLProtocol[];\n require_tld?: boolean;\n require_protocol?: boolean;\n require_host?: boolean;\n require_port?: boolean;\n require_valid_protocol?: boolean;\n allow_underscores?: boolean;\n host_whitelist?: (string | RegExp)[];\n host_blacklist?: (string | RegExp)[];\n allow_trailing_dot?: boolean;\n allow_protocol_relative_urls?: boolean;\n disallow_auth?: boolean;\n validate_length?: boolean;\n allow_fragments?: boolean;\n allow_query_components?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isuuid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUUID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUUID(version?: UUIDVersion): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of UUIDVersion"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"1")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"2")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"3")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"4")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"5")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'2'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'3'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'all'")))),(0,l.kt)("h4",{id:"isuppercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUppercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUppercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvariablewidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVariableWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVariableWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVAT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVAT(countryCode: VATCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of VATCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'VE'")))),(0,l.kt)("h4",{id:"iswhitelisted"},(0,l.kt)("inlineCode",{parentName:"h4"},"isWhitelisted()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isWhitelisted(chars: string | readonly string[]): ValidationChain\n")),(0,l.kt)("h4",{id:"matches"},(0,l.kt)("inlineCode",{parentName:"h4"},"matches()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"matches(pattern: RegExp | string, modifiers?: string): ValidationChain\n")))}p.isMDXComponent=!0;var d=["components"],m={toc:[{value:"blacklist()",id:"blacklist",level:4},{value:"escape()",id:"escape",level:4},{value:"unescape()",id:"unescape",level:4},{value:"ltrim()",id:"ltrim",level:4},{value:"normalizeEmail()",id:"normalizeemail",level:4},{value:"rtrim()",id:"rtrim",level:4},{value:"stripLow()",id:"striplow",level:4},{value:"toBoolean()",id:"toboolean",level:4},{value:"toDate()",id:"todate",level:4},{value:"toFloat()",id:"tofloat",level:4},{value:"toInt()",id:"toint",level:4},{value:"trim()",id:"trim",level:4},{value:"whitelist()",id:"whitelist",level:4}]};function k(e){var a=e.components,n=(0,i.Z)(e,d);return(0,l.kt)("wrapper",(0,t.Z)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"blacklist"},(0,l.kt)("inlineCode",{parentName:"h4"},"blacklist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"blacklist(chars: string): ValidationChain\n")),(0,l.kt)("h4",{id:"escape"},(0,l.kt)("inlineCode",{parentName:"h4"},"escape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"escape(): ValidationChain\n")),(0,l.kt)("h4",{id:"unescape"},(0,l.kt)("inlineCode",{parentName:"h4"},"unescape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"unescape(): ValidationChain\n")),(0,l.kt)("h4",{id:"ltrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"ltrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"ltrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"normalizeemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"normalizeEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"normalizeEmail(options?: {\n all_lowercase?: boolean;\n gmail_lowercase?: boolean;\n gmail_remove_dots?: boolean;\n gmail_remove_subaddress?: boolean;\n gmail_convert_googlemaildotcom?: boolean;\n outlookdotcom_lowercase?: boolean;\n outlookdotcom_remove_subaddress?: boolean;\n yahoo_lowercase?: boolean;\n yahoo_remove_subaddress?: boolean;\n icloud_lowercase?: boolean;\n icloud_remove_subaddress?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"rtrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"rtrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"rtrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"striplow"},(0,l.kt)("inlineCode",{parentName:"h4"},"stripLow()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"stripLow(keep_new_lines?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"toboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"toBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toBoolean(strict?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"todate"},(0,l.kt)("inlineCode",{parentName:"h4"},"toDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toDate(): ValidationChain\n")),(0,l.kt)("h4",{id:"tofloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"toFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toFloat(): ValidationChain\n")),(0,l.kt)("h4",{id:"toint"},(0,l.kt)("inlineCode",{parentName:"h4"},"toInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toInt(radix?: number): ValidationChain\n")),(0,l.kt)("h4",{id:"trim"},(0,l.kt)("inlineCode",{parentName:"h4"},"trim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"trim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"whitelist"},(0,l.kt)("inlineCode",{parentName:"h4"},"whitelist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"whitelist(chars: string): ValidationChain\n")))}k.isMDXComponent=!0;var s=["components"],N={title:"ValidationChain",toc_max_heading_level:4},u="ValidationChain",c={unversionedId:"api/validation-chain",id:"api/validation-chain",title:"ValidationChain",description:"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine",source:"@site/../docs/api/validation-chain.md",sourceDirName:"api",slug:"/api/validation-chain",permalink:"/docs/next/api/validation-chain",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/validation-chain.md",tags:[],version:"current",frontMatter:{title:"ValidationChain",toc_max_heading_level:4},sidebar:"api",previous:{title:"oneOf",permalink:"/docs/next/api/one-of"},next:{title:"ExpressValidator",permalink:"/docs/next/api/express-validator"}},C={},h=[{value:"Built-in validators",id:"built-in-validators",level:2},{value:".custom()",id:"custom",level:3},{value:".exists()",id:"exists",level:3},{value:".isArray()",id:"isarray",level:3},{value:".isObject()",id:"isobject",level:3},{value:".isString()",id:"isstring",level:3},{value:".notEmpty()",id:"notempty",level:3},{value:"Standard validators",id:"standard-validators",level:3},{value:"Built-in sanitizers",id:"built-in-sanitizers",level:2},{value:".customSanitizer()",id:"customsanitizer",level:3},{value:".default()",id:"default",level:3},{value:".replace()",id:"replace",level:3},{value:".toArray()",id:"toarray",level:3},{value:".toLowerCase()",id:"tolowercase",level:3},{value:".toUpperCase()",id:"touppercase",level:3},{value:"Standard sanitizers",id:"standard-sanitizers",level:3},{value:"Modifiers",id:"modifiers",level:2},{value:".bail()",id:"bail",level:3},{value:".if()",id:"if",level:3},{value:".not()",id:"not",level:3},{value:".optional()",id:"optional",level:3},{value:".withMessage()",id:"withmessage",level:3}],g={toc:h};function v(e){var a=e.components,n=(0,i.Z)(e,s);return(0,l.kt)("wrapper",(0,t.Z)({},g,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"validationchain"},(0,l.kt)("inlineCode",{parentName:"h1"},"ValidationChain")),(0,l.kt)("p",null,"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine\ntune the behaviour of the validation for a certain field or fields."),(0,l.kt)("p",null,"Validation chains are created by the ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/check"},(0,l.kt)("inlineCode",{parentName:"a"},"check()")," functions"),", and they can be used in a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"as express.js route handlers, which will run the validation automatically;"),(0,l.kt)("li",{parentName:"ul"},"as parameter of some of express-validator's other functions, like ",(0,l.kt)("inlineCode",{parentName:"li"},"oneOf()")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"checkExact()"),";"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"/docs/next/guides/manually-running"},"standalone, where you have full control over when the validation runs and how"),".")),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If you're writing a function that accepts a ",(0,l.kt)("inlineCode",{parentName:"p"},"ValidationChain"),", the TypeScript type can be imported using"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { ValidationChain } from 'express-validator';\n"))),(0,l.kt)("h2",{id:"built-in-validators"},"Built-in validators"),(0,l.kt)("h3",{id:"custom"},(0,l.kt)("inlineCode",{parentName:"h3"},".custom()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"custom(validator: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom validator function to the chain."),(0,l.kt)("p",null,"The field value will be valid if:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The custom validator returns truthy; or"),(0,l.kt)("li",{parentName:"ul"},"The custom validator returns a promise that resolves.")),(0,l.kt)("p",null,"If the custom validator returns falsy, a promise that rejects, or if the function throws,\nthen the value will be considered invalid."),(0,l.kt)("p",null,"A common use case for ",(0,l.kt)("inlineCode",{parentName:"p"},".custom()")," is to verify that an e-mail address doesn't already exists.\nIf it does, return an error:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/signup', body('email').custom(async value => {\n const existingUser = await Users.findUserByEmail(value);\n if (existingUser) {\n throw new Error('E-mail already in use');\n }\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"exists"},(0,l.kt)("inlineCode",{parentName:"h3"},".exists()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"exists(options?: {\n values?: 'undefined' | 'null' | 'falsy',\n checkNull?: boolean,\n checkFalsy?: boolean\n}): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check if the field exists."),(0,l.kt)("p",null,"Which values are considered existent depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),". By default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.checkNull")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),", respectively."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"Using ",(0,l.kt)("inlineCode",{parentName:"p"},".exists()")," is only necessary if you aren't adding any other validator or sanitizer.")),(0,l.kt)("h3",{id:"isarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".isArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isArray(options?: { min?: number; max?: number }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an array.\nThis is analogous to ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray"},"the JavaScript function ",(0,l.kt)("inlineCode",{parentName:"a"},"Array.isArray(value)")),"."),(0,l.kt)("p",null,"You can also check that the array's length is greater than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.min")," and/or\nthat it's less than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.max"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// Verifies that the friends list is an array\nbody('friends').isArray();\n\n// Verifies that ingredients is an array with length >= 0\nbody('ingredients').isArray({ min: 0 });\n\n// Verifies that team_members is an array with length >= 0 and <= 10\ncheck('team_members').isArray({ min: 0, max: 10 });\n")),(0,l.kt)("h3",{id:"isobject"},(0,l.kt)("inlineCode",{parentName:"h3"},".isObject()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isObject(options?: { strict?: boolean }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an object.\nFor example, ",(0,l.kt)("inlineCode",{parentName:"p"},"{}"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"{ foo: 'bar' }")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"new MyCustomClass()")," would all pass this validator."),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"strict")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then this validator works analogous to\n",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'object'")," in pure JavaScript"),",\nwhere both arrays and the ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," value are considered objects."),(0,l.kt)("h3",{id:"isstring"},(0,l.kt)("inlineCode",{parentName:"h3"},".isString()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isString(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string.\nThis is analogous to a ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'string'")," in pure JavaScript"),"."),(0,l.kt)("h3",{id:"notempty"},(0,l.kt)("inlineCode",{parentName:"h3"},".notEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"notEmpty(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string that's not empty.\nThis is analogous to ",(0,l.kt)("inlineCode",{parentName:"p"},".not().isEmpty()"),"."),(0,l.kt)("h3",{id:"standard-validators"},"Standard validators"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard validators ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(p,{mdxType:"ValidatorValidators"}),(0,l.kt)("h2",{id:"built-in-sanitizers"},"Built-in sanitizers"),(0,l.kt)("h3",{id:"customsanitizer"},(0,l.kt)("inlineCode",{parentName:"h3"},".customSanitizer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"customSanitizer(sanitizer: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom sanitizer function to the chain.\nThe value returned by the function will become the new value of the field."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/object/:id', param('id').customSanitizer((value, { req }) => {\n // In this app, users have MongoDB style object IDs, everything else, numbers\n return req.query.type === 'user' ? ObjectId(value) : Number(value);\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"default"},(0,l.kt)("inlineCode",{parentName:"h3"},".default()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"default(defaultValue: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field if it's either an empty string, ",(0,l.kt)("inlineCode",{parentName:"p"},"null"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),", or ",(0,l.kt)("inlineCode",{parentName:"p"},"NaN"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').default('foo'), (req, res, next) => {\n // 'bar' => 'bar'\n // '' => 'foo'\n // undefined => 'foo'\n // null => 'foo'\n // NaN => 'foo'\n});\n")),(0,l.kt)("h3",{id:"replace"},(0,l.kt)("inlineCode",{parentName:"h3"},".replace()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"replace(valuesFrom: any[], valueTo: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field with ",(0,l.kt)("inlineCode",{parentName:"p"},"valueTo")," whenever the current value is in ",(0,l.kt)("inlineCode",{parentName:"p"},"valuesFrom"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').replace(['bar', 'BAR'], 'foo'), (req, res, next) => {\n // 'bar_' => 'bar_'\n // 'bar' => 'foo'\n // 'BAR' => 'foo'\n console.log(req.body.username);\n});\n")),(0,l.kt)("h3",{id:"toarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".toArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toArray(): ValidationChain\n")),(0,l.kt)("p",null,"Transforms the value to an array. If it already is one, nothing is done. ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined")," values become empty arrays."),(0,l.kt)("h3",{id:"tolowercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toLowerCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toLowerCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to lower case. If not a string, does nothing."),(0,l.kt)("h3",{id:"touppercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toUpperCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toUpperCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to upper case. If not a string, does nothing."),(0,l.kt)("h3",{id:"standard-sanitizers"},"Standard sanitizers"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard sanitizers ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(k,{mdxType:"ValidatorSanitizers"}),(0,l.kt)("h2",{id:"modifiers"},"Modifiers"),(0,l.kt)("h3",{id:"bail"},(0,l.kt)("inlineCode",{parentName:"h3"},".bail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"bail(options?: { level: 'chain' | 'request' }): ValidationChain\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Parameters:")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Name"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"options.level")),(0,l.kt)("td",{parentName:"tr",align:null},"The level at which the validation chain should be stopped. Defaults to ",(0,l.kt)("inlineCode",{parentName:"td"},"chain"),".")))),(0,l.kt)("p",null,"Stops running the validation chain if any of the previous validators failed."),(0,l.kt)("p",null,"This is useful to prevent a custom validator that touches a database or external API from running\nwhen you know it will fail."),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},".bail()")," can be used multiple times in the same validation chain if desired:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('username')\n .isEmail()\n // If not an email, stop here\n .bail()\n .custom(checkDenylistDomain)\n // If domain is not allowed, don't go check if it already exists\n .bail()\n .custom(checkEmailExists);\n")),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"level")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"request"),", then also no further validation chains will run on the current request.\nFor example:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.get(\n '/search',\n query('query').notEmpty().bail({ level: 'request' }),\n // If `query` is empty, then the following validation chains won't run:\n query('query_type').isIn(['user', 'posts']),\n query('num_results').isInt(),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Functions such as ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,l.kt)("inlineCode",{parentName:"a"},"oneOf()"))," and ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/check-exact"},(0,l.kt)("inlineCode",{parentName:"a"},"checkExact()"))," can become slower\nwhen using request-level bail, since validation chains that would normally run in parallel need to\nrun in sequence.")),(0,l.kt)("h3",{id:"if"},(0,l.kt)("inlineCode",{parentName:"h3"},".if()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"if(condition: CustomValidator | ContextRunner): ValidationChain\n")),(0,l.kt)("p",null,"Adds a condition on whether the validation chain should continue running on a field or not."),(0,l.kt)("p",null,"The condition may be either a ",(0,l.kt)("a",{parentName:"p",href:"#custom"},"custom validator")," or a ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/misc#contextrunner"},(0,l.kt)("inlineCode",{parentName:"a"},"ContextRunner")," instance"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('newPassword')\n // Only validate if the old password has been provided\n .if((value, { req }) => req.body.oldPassword)\n // Or, use a validation chain instead\n .if(body('oldPassword').notEmpty())\n // The length of the new password will only be checked if `oldPassword` is provided.\n .isLength({ min: 6 });\n")),(0,l.kt)("h3",{id:"not"},(0,l.kt)("inlineCode",{parentName:"h3"},".not()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"not(): ValidationChain\n")),(0,l.kt)("p",null,"Negates the result of the next validator in the chain."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"check('weekday').not().isIn(['sunday', 'saturday']);\n")),(0,l.kt)("h3",{id:"optional"},(0,l.kt)("inlineCode",{parentName:"h3"},".optional()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"optional(options?: boolean | {\n values?: 'undefined' | 'null' | 'falsy',\n nullable?: boolean,\n checkFalsy?: boolean,\n}): ValidationChain\n")),(0,l.kt)("p",null,"Marks the current validation chain as optional.\nAn optional field skips validation depending on its value, instead of failing it."),(0,l.kt)("p",null,"Which values are considered optional depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),".\nBy default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.nullable")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),"."),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"options")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then the field won't be optional."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Unlike validators and sanitizers, ",(0,l.kt)("inlineCode",{parentName:"p"},".optional()")," is not positional: it'll affect how values are interpreted,\nno matter where it happens in the chain."),(0,l.kt)("p",{parentName:"admonition"},"For example, there are no differences between this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').isLength({ max: 100 }).isJSON().optional().\n")),(0,l.kt)("p",{parentName:"admonition"},"and this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').optional().isLength({ max: 100 }).isJSON().\n"))),(0,l.kt)("h3",{id:"withmessage"},(0,l.kt)("inlineCode",{parentName:"h3"},".withMessage()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"withMessage(message: any): ValidationChain\n")),(0,l.kt)("p",null,"Sets the error message used by the previous validator."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f0dd6a1c.90715f26.js b/assets/js/f0dd6a1c.90715f26.js new file mode 100644 index 0000000..5e6493e --- /dev/null +++ b/assets/js/f0dd6a1c.90715f26.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1185],{5318:(e,a,n)=>{n.d(a,{Zo:()=>m,kt:()=>u});var t=n(7378);function i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function l(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=t.createContext({}),d=function(e){var a=t.useContext(p),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},m=function(e){var a=d(e.components);return t.createElement(p.Provider,{value:a},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},N=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),k=d(n),N=i,u=k["".concat(p,".").concat(N)]||k[N]||s[N]||l;return n?t.createElement(u,r(r({ref:a},m),{},{components:n})):t.createElement(u,r({ref:a},m))}));function u(e,a){var n=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=n.length,r=new Array(l);r[0]=N;var o={};for(var p in a)hasOwnProperty.call(a,p)&&(o[p]=a[p]);o.originalType=e,o[k]="string"==typeof e?e:i,r[1]=o;for(var d=2;d{n.r(a),n.d(a,{assets:()=>C,contentTitle:()=>u,default:()=>v,frontMatter:()=>N,metadata:()=>c,toc:()=>h});var t=n(5773),i=n(808),l=(n(7378),n(5318)),r=["components"],o={toc:[{value:"contains()",id:"contains",level:4},{value:"equals()",id:"equals",level:4},{value:"isAfter()",id:"isafter",level:4},{value:"isAlpha()",id:"isalpha",level:4},{value:"isAlphanumeric()",id:"isalphanumeric",level:4},{value:"isAscii()",id:"isascii",level:4},{value:"isBase32()",id:"isbase32",level:4},{value:"isBase58()",id:"isbase58",level:4},{value:"isBase64()",id:"isbase64",level:4},{value:"isBefore()",id:"isbefore",level:4},{value:"isBIC()",id:"isbic",level:4},{value:"isBoolean()",id:"isboolean",level:4},{value:"isBtcAddress()",id:"isbtcaddress",level:4},{value:"isByteLength()",id:"isbytelength",level:4},{value:"isCreditCard()",id:"iscreditcard",level:4},{value:"isCurrency()",id:"iscurrency",level:4},{value:"isDataURI()",id:"isdatauri",level:4},{value:"isDate()",id:"isdate",level:4},{value:"isDecimal()",id:"isdecimal",level:4},{value:"isDivisibleBy()",id:"isdivisibleby",level:4},{value:"isEAN()",id:"isean",level:4},{value:"isEmail()",id:"isemail",level:4},{value:"isEmpty()",id:"isempty",level:4},{value:"isEthereumAddress()",id:"isethereumaddress",level:4},{value:"isFQDN()",id:"isfqdn",level:4},{value:"isFloat()",id:"isfloat",level:4},{value:"isFreightContainerID()",id:"isfreightcontainerid",level:4},{value:"isFullWidth()",id:"isfullwidth",level:4},{value:"isHalfWidth()",id:"ishalfwidth",level:4},{value:"isHash()",id:"ishash",level:4},{value:"isHexColor()",id:"ishexcolor",level:4},{value:"isHexadecimal()",id:"ishexadecimal",level:4},{value:"isHSL()",id:"ishsl",level:4},{value:"isIBAN()",id:"isiban",level:4},{value:"isIdentityCard()",id:"isidentitycard",level:4},{value:"isIMEI()",id:"isimei",level:4},{value:"isIP()",id:"isip",level:4},{value:"isIPRange()",id:"isiprange",level:4},{value:"isISBN()",id:"isisbn",level:4},{value:"isISSN()",id:"isissn",level:4},{value:"isISIN()",id:"isisin",level:4},{value:"isISO6346()",id:"isiso6346",level:4},{value:"isISO6391()",id:"isiso6391",level:4},{value:"isISO8601()",id:"isiso8601",level:4},{value:"isISO31661Alpha2()",id:"isiso31661alpha2",level:4},{value:"isISO31661Alpha3()",id:"isiso31661alpha3",level:4},{value:"isISO4217()",id:"isiso4217",level:4},{value:"isISRC()",id:"isisrc",level:4},{value:"isIn()",id:"isin",level:4},{value:"isInt()",id:"isint",level:4},{value:"isJSON()",id:"isjson",level:4},{value:"isJWT()",id:"isjwt",level:4},{value:"isLatLong()",id:"islatlong",level:4},{value:"isLength()",id:"islength",level:4},{value:"isLicensePlate()",id:"islicenseplate",level:4},{value:"isLocale()",id:"islocale",level:4},{value:"isLowercase()",id:"islowercase",level:4},{value:"isLuhnNumber()",id:"isluhnnumber",level:4},{value:"isMagnetURI()",id:"ismagneturi",level:4},{value:"isMailtoURI()",id:"ismailtouri",level:4},{value:"isMACAddress()",id:"ismacaddress",level:4},{value:"isMD5()",id:"ismd5",level:4},{value:"isMimeType()",id:"ismimetype",level:4},{value:"isMobilePhone()",id:"ismobilephone",level:4},{value:"isMongoId()",id:"ismongoid",level:4},{value:"isMultibyte()",id:"ismultibyte",level:4},{value:"isNumeric()",id:"isnumeric",level:4},{value:"isOctal()",id:"isoctal",level:4},{value:"isPassportNumber()",id:"ispassportnumber",level:4},{value:"isPort()",id:"isport",level:4},{value:"isPostalCode()",id:"ispostalcode",level:4},{value:"isRgbColor()",id:"isrgbcolor",level:4},{value:"isRFC3339()",id:"isrfc3339",level:4},{value:"isSemVer()",id:"issemver",level:4},{value:"isSlug()",id:"isslug",level:4},{value:"isStrongPassword()",id:"isstrongpassword",level:4},{value:"isSurrogatePair()",id:"issurrogatepair",level:4},{value:"isTaxID()",id:"istaxid",level:4},{value:"isTime()",id:"istime",level:4},{value:"isURL()",id:"isurl",level:4},{value:"isUUID()",id:"isuuid",level:4},{value:"isUppercase()",id:"isuppercase",level:4},{value:"isVariableWidth()",id:"isvariablewidth",level:4},{value:"isVAT()",id:"isvat",level:4},{value:"isWhitelisted()",id:"iswhitelisted",level:4},{value:"matches()",id:"matches",level:4}]};function p(e){var a=e.components,n=(0,i.Z)(e,r);return(0,l.kt)("wrapper",(0,t.Z)({},o,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"contains"},(0,l.kt)("inlineCode",{parentName:"h4"},"contains()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"contains(elem: any, options?: {\n ignoreCase?: boolean;\n minOccurrences?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"equals"},(0,l.kt)("inlineCode",{parentName:"h4"},"equals()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"equals(comparison: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isafter"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAfter()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAfter(dateOrOptions?: string | {\n comparisonDate?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isalpha"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlpha()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlpha(locale?: AlphaLocale, options?: {\n ignore?: string | string[] | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphaLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isalphanumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAlphanumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAlphanumeric(locale?: AlphanumericLocale, options?: {\n ignore?: string | RegExp;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of AlphanumericLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-QM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hi-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ku-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS@latin'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")))),(0,l.kt)("h4",{id:"isascii"},(0,l.kt)("inlineCode",{parentName:"h4"},"isAscii()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isAscii(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase32"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase32()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase32(options?: {\n crockford?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase58"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase58()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase58(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbase64"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBase64()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBase64(options?: {\n urlSafe?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbefore"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBefore()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBefore(date?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"isbic"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBIC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBIC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBoolean(options?: {\n strict?: boolean;\n loose?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isbtcaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isBtcAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isBtcAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isbytelength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isByteLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isByteLength(options: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscreditcard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCreditCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCreditCard(options?: {\n provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"iscurrency"},(0,l.kt)("inlineCode",{parentName:"h4"},"isCurrency()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isCurrency(options?: {\n symbol?: string;\n require_symbol?: boolean;\n allow_space_after_symbol?: boolean;\n symbol_after_digits?: boolean;\n allow_negatives?: boolean;\n parens_for_negatives?: boolean;\n negative_sign_before_digits?: boolean;\n negative_sign_after_digits?: boolean;\n allow_negative_sign_placeholder?: boolean;\n thousands_separator?: string;\n decimal_separator?: string;\n allow_decimal?: boolean;\n require_decimal?: boolean;\n digits_after_decimal?: number[];\n allow_space_after_digits?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdatauri"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDataURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDataURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"isdate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDate(options?: {\n format?: string;\n delimiters?: string[];\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDecimal(options?: {\n decimal_digits?: string;\n force_decimal?: boolean;\n locale?: AlphanumericLocale;\n blacklisted_chars?: string;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isdivisibleby"},(0,l.kt)("inlineCode",{parentName:"h4"},"isDivisibleBy()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isDivisibleBy(number: number): ValidationChain\n")),(0,l.kt)("h4",{id:"isean"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEAN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmail(options?: {\n allow_display_name?: boolean;\n allow_underscores?: boolean;\n allow_utf8_local_part?: boolean;\n require_tld?: boolean;\n ignore_max_length?: boolean;\n allow_ip_domain?: boolean;\n domain_specific_validation?: boolean;\n blacklisted_chars?: string;\n host_blacklist?: string[];\n host_whitelist?: string[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isempty"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEmpty(options?: {\n ignore_whitespace: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isethereumaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isEthereumAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isEthereumAddress(): ValidationChain\n")),(0,l.kt)("h4",{id:"isfqdn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFQDN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFQDN(options?: {\n require_tld?: boolean;\n allow_underscores?: boolean;\n allow_trailing_dot?: boolean;\n allow_numeric_tld?: boolean;\n allow_wildcard?: boolean;\n ignore_max_length?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFloat(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isfreightcontainerid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFreightContainerID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFreightContainerID(): ValidationChain\n")),(0,l.kt)("h4",{id:"isfullwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isFullWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isFullWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishalfwidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHalfWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHalfWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishash"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHash()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHash(algorithm: HashAlgorithm): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of HashAlgorithm"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'md5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha256'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha384'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sha512'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ripemd160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger128'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger160'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tiger192'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'crc32b'")))),(0,l.kt)("h4",{id:"ishexcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexColor(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishexadecimal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHexadecimal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHexadecimal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ishsl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isHSL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isHSL(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiban"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIBAN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIBAN(options?: {\n whitelist?: readonly IBANCode[];\n blacklist?: readonly IBANCode[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isidentitycard"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIdentityCard()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIdentityCard(locale?: IdentityCardLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IdentityCardLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hk-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"isimei"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIMEI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIMEI(options?: {\n allow_hyphens?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isip"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIP()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIP(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isiprange"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIPRange()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIPRange(version?: 4 | 6): ValidationChain\n")),(0,l.kt)("h4",{id:"isisbn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISBN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISBN(versionOrOptions?: number | {\n version?: '10' | '13';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isissn"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISSN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISSN(options?: {\n case_sensitive?: boolean;\n require_hyphen?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isisin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISIN()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISIN(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso6346"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO6346()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO6346(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso6391"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO6391()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO6391(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso8601"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO8601()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO8601(options?: {\n strict?: boolean;\n strictSeparator?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha2"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha2()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha2(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso31661alpha3"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO31661Alpha3()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO31661Alpha3(): ValidationChain\n")),(0,l.kt)("h4",{id:"isiso4217"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISO4217()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISO4217(): ValidationChain\n")),(0,l.kt)("h4",{id:"isisrc"},(0,l.kt)("inlineCode",{parentName:"h4"},"isISRC()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isISRC(): ValidationChain\n")),(0,l.kt)("h4",{id:"isin"},(0,l.kt)("inlineCode",{parentName:"h4"},"isIn()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isIn(values: readonly any[]): ValidationChain\n")),(0,l.kt)("h4",{id:"isint"},(0,l.kt)("inlineCode",{parentName:"h4"},"isInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isInt(options?: {\n min?: number;\n max?: number;\n lt?: number;\n gt?: number;\n allow_leading_zeroes?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjson"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJSON()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJSON(options?: {\n allow_primitives?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isjwt"},(0,l.kt)("inlineCode",{parentName:"h4"},"isJWT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isJWT(): ValidationChain\n")),(0,l.kt)("h4",{id:"islatlong"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLatLong()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLatLong(options?: {\n checkDMS?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islength"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLength()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLength(options: {\n min?: number;\n max?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"islicenseplate"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLicensePlate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLicensePlate(locale: IsLicensePlateLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of IsLicensePlateLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")))),(0,l.kt)("h4",{id:"islocale"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLocale()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLocale(): ValidationChain\n")),(0,l.kt)("h4",{id:"islowercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLowercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLowercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isluhnnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isLuhnNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isLuhnNumber(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismagneturi"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMagnetURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMagnetURI(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismailtouri"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMailtoURI()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMailtoURI(options?: {\n allow_display_name?: boolean;\n allow_underscores?: boolean;\n allow_utf8_local_part?: boolean;\n require_tld?: boolean;\n ignore_max_length?: boolean;\n allow_ip_domain?: boolean;\n domain_specific_validation?: boolean;\n blacklisted_chars?: string;\n host_blacklist?: string[];\n host_whitelist?: string[];\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"ismacaddress"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMACAddress()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMACAddress(options?: {\n no_separators?: boolean;\n no_colons?: boolean;\n eui?: '48' | '64';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"ismd5"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMD5()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMD5(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismimetype"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMimeType()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMimeType(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismobilephone"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMobilePhone()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMobilePhone(locale: MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: {\n strictMode?: boolean;\n}): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of MobilePhoneLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'am-AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-AE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-BH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-EH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-IQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-JO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-KW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-MA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-OM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-PS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-SY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ar-YE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'az-AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'be-BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bn-BD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bs-BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'da-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dv-MV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dz-BT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-BW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-KN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-LS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-MU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-RW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-SS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-TZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-UG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-ZW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-CU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-VE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-AF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fa-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fj-FJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fo-FO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-CM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-GP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-MQ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-PF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-RE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-WF'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ga-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'he-IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'id-ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ir-IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ja-JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ka-GE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kk-KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'kl-GL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ko-KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ky-KG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mg-MG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mn-MN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ms-MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'my-MM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mz-MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nb-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-AW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ne-NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nn-NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-AO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-MD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ru-RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'si-LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'so-SO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sq-AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sr-RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tg-TJ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'th-TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tk-TM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'tr-TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uk-UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'uz-Uz'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'vi-VN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-HK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'zh-TW'")))),(0,l.kt)("h4",{id:"ismongoid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMongoId()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMongoId(): ValidationChain\n")),(0,l.kt)("h4",{id:"ismultibyte"},(0,l.kt)("inlineCode",{parentName:"h4"},"isMultibyte()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isMultibyte(): ValidationChain\n")),(0,l.kt)("h4",{id:"isnumeric"},(0,l.kt)("inlineCode",{parentName:"h4"},"isNumeric()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isNumeric(options?: {\n no_symbols: boolean;\n locale?: AlphanumericLocale;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isoctal"},(0,l.kt)("inlineCode",{parentName:"h4"},"isOctal()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isOctal(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispassportnumber"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPassportNumber()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPassportNumber(countryCode?: PassportCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PassportCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")))),(0,l.kt)("h4",{id:"isport"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPort()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPort(): ValidationChain\n")),(0,l.kt)("h4",{id:"ispostalcode"},(0,l.kt)("inlineCode",{parentName:"h4"},"isPostalCode()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isPostalCode(locale: PostalCodeLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of PostalCodeLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'any'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AD'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'JP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NP'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TW'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ZM'")))),(0,l.kt)("h4",{id:"isrgbcolor"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRgbColor()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRgbColor(includePercentValues?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"isrfc3339"},(0,l.kt)("inlineCode",{parentName:"h4"},"isRFC3339()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isRFC3339(): ValidationChain\n")),(0,l.kt)("h4",{id:"issemver"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSemVer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSemVer(): ValidationChain\n")),(0,l.kt)("h4",{id:"isslug"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSlug()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSlug(): ValidationChain\n")),(0,l.kt)("h4",{id:"isstrongpassword"},(0,l.kt)("inlineCode",{parentName:"h4"},"isStrongPassword()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isStrongPassword(options?: {\n minLength?: number;\n minLowercase?: number;\n minUppercase?: number;\n minNumbers?: number;\n minSymbols?: number;\n returnScore?: boolean;\n pointsPerUnique?: number;\n pointsPerRepeat?: number;\n pointsForContainingLower?: number;\n pointsForContainingUpper?: number;\n pointsForContainingNumber?: number;\n pointsForContainingSymbol?: number;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"issurrogatepair"},(0,l.kt)("inlineCode",{parentName:"h4"},"isSurrogatePair()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isSurrogatePair(): ValidationChain\n")),(0,l.kt)("h4",{id:"istaxid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTaxID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTaxID(locale: TaxIDLocale): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of TaxIDLocale"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'bg-BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'cs-CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'de-DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'dk-DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'el-GR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'en-US'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'es-ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'et-EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fi-FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'fr-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hr-HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'hu-HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'it-IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lb-LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lt-LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'lv-LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'mt-MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'nl-NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pl-PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'pt-PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ro-RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sk-SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sl-SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'sv-SE'")))),(0,l.kt)("h4",{id:"istime"},(0,l.kt)("inlineCode",{parentName:"h4"},"isTime()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isTime(options: {\n hourFormat?: 'hour24' | 'hour12';\n mode?: 'default' | 'withSeconds';\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isurl"},(0,l.kt)("inlineCode",{parentName:"h4"},"isURL()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isURL(options?: {\n protocols?: URLProtocol[];\n require_tld?: boolean;\n require_protocol?: boolean;\n require_host?: boolean;\n require_port?: boolean;\n require_valid_protocol?: boolean;\n allow_underscores?: boolean;\n host_whitelist?: (string | RegExp)[];\n host_blacklist?: (string | RegExp)[];\n allow_trailing_dot?: boolean;\n allow_protocol_relative_urls?: boolean;\n disallow_auth?: boolean;\n validate_length?: boolean;\n allow_fragments?: boolean;\n allow_query_components?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"isuuid"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUUID()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUUID(version?: UUIDVersion): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of UUIDVersion"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"1")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"2")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"3")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"4")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"5")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'1'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'2'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'3'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'4'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'5'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'all'")))),(0,l.kt)("h4",{id:"isuppercase"},(0,l.kt)("inlineCode",{parentName:"h4"},"isUppercase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isUppercase(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvariablewidth"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVariableWidth()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVariableWidth(): ValidationChain\n")),(0,l.kt)("h4",{id:"isvat"},(0,l.kt)("inlineCode",{parentName:"h4"},"isVAT()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isVAT(countryCode: VATCountryCode): ValidationChain\n")),(0,l.kt)("details",null,(0,l.kt)("summary",null,"Possible values of VATCountryCode"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GB'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'FR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'LU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ES'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MK'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'ID'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'IL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'KZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NG'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RU'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SM'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'RS'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CH'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'TR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UZ'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'AR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'BR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CL'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'CR'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'EC'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'SV'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'GT'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'HN'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'MX'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'NI'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PA'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'PE'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'DO'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'UY'")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"'VE'")))),(0,l.kt)("h4",{id:"iswhitelisted"},(0,l.kt)("inlineCode",{parentName:"h4"},"isWhitelisted()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isWhitelisted(chars: string | readonly string[]): ValidationChain\n")),(0,l.kt)("h4",{id:"matches"},(0,l.kt)("inlineCode",{parentName:"h4"},"matches()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"matches(pattern: RegExp | string, modifiers?: string): ValidationChain\n")))}p.isMDXComponent=!0;var d=["components"],m={toc:[{value:"blacklist()",id:"blacklist",level:4},{value:"escape()",id:"escape",level:4},{value:"unescape()",id:"unescape",level:4},{value:"ltrim()",id:"ltrim",level:4},{value:"normalizeEmail()",id:"normalizeemail",level:4},{value:"rtrim()",id:"rtrim",level:4},{value:"stripLow()",id:"striplow",level:4},{value:"toBoolean()",id:"toboolean",level:4},{value:"toDate()",id:"todate",level:4},{value:"toFloat()",id:"tofloat",level:4},{value:"toInt()",id:"toint",level:4},{value:"trim()",id:"trim",level:4},{value:"whitelist()",id:"whitelist",level:4}]};function k(e){var a=e.components,n=(0,i.Z)(e,d);return(0,l.kt)("wrapper",(0,t.Z)({},m,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h4",{id:"blacklist"},(0,l.kt)("inlineCode",{parentName:"h4"},"blacklist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"blacklist(chars: string): ValidationChain\n")),(0,l.kt)("h4",{id:"escape"},(0,l.kt)("inlineCode",{parentName:"h4"},"escape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"escape(): ValidationChain\n")),(0,l.kt)("h4",{id:"unescape"},(0,l.kt)("inlineCode",{parentName:"h4"},"unescape()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"unescape(): ValidationChain\n")),(0,l.kt)("h4",{id:"ltrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"ltrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"ltrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"normalizeemail"},(0,l.kt)("inlineCode",{parentName:"h4"},"normalizeEmail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"normalizeEmail(options?: {\n all_lowercase?: boolean;\n gmail_lowercase?: boolean;\n gmail_remove_dots?: boolean;\n gmail_remove_subaddress?: boolean;\n gmail_convert_googlemaildotcom?: boolean;\n outlookdotcom_lowercase?: boolean;\n outlookdotcom_remove_subaddress?: boolean;\n yahoo_lowercase?: boolean;\n yahoo_remove_subaddress?: boolean;\n icloud_lowercase?: boolean;\n icloud_remove_subaddress?: boolean;\n}): ValidationChain\n")),(0,l.kt)("h4",{id:"rtrim"},(0,l.kt)("inlineCode",{parentName:"h4"},"rtrim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"rtrim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"striplow"},(0,l.kt)("inlineCode",{parentName:"h4"},"stripLow()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"stripLow(keep_new_lines?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"toboolean"},(0,l.kt)("inlineCode",{parentName:"h4"},"toBoolean()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toBoolean(strict?: boolean): ValidationChain\n")),(0,l.kt)("h4",{id:"todate"},(0,l.kt)("inlineCode",{parentName:"h4"},"toDate()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toDate(): ValidationChain\n")),(0,l.kt)("h4",{id:"tofloat"},(0,l.kt)("inlineCode",{parentName:"h4"},"toFloat()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toFloat(): ValidationChain\n")),(0,l.kt)("h4",{id:"toint"},(0,l.kt)("inlineCode",{parentName:"h4"},"toInt()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toInt(radix?: number): ValidationChain\n")),(0,l.kt)("h4",{id:"trim"},(0,l.kt)("inlineCode",{parentName:"h4"},"trim()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"trim(chars?: string): ValidationChain\n")),(0,l.kt)("h4",{id:"whitelist"},(0,l.kt)("inlineCode",{parentName:"h4"},"whitelist()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"whitelist(chars: string): ValidationChain\n")))}k.isMDXComponent=!0;var s=["components"],N={title:"ValidationChain",toc_max_heading_level:4},u="ValidationChain",c={unversionedId:"api/validation-chain",id:"api/validation-chain",title:"ValidationChain",description:"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine",source:"@site/../docs/api/validation-chain.md",sourceDirName:"api",slug:"/api/validation-chain",permalink:"/docs/next/api/validation-chain",draft:!1,editUrl:"https://github.com/express-validator/express-validator/edit/master/docs/../docs/api/validation-chain.md",tags:[],version:"current",frontMatter:{title:"ValidationChain",toc_max_heading_level:4},sidebar:"api",previous:{title:"oneOf",permalink:"/docs/next/api/one-of"},next:{title:"ExpressValidator",permalink:"/docs/next/api/express-validator"}},C={},h=[{value:"Built-in validators",id:"built-in-validators",level:2},{value:".custom()",id:"custom",level:3},{value:".exists()",id:"exists",level:3},{value:".isArray()",id:"isarray",level:3},{value:".isObject()",id:"isobject",level:3},{value:".isString()",id:"isstring",level:3},{value:".notEmpty()",id:"notempty",level:3},{value:"Standard validators",id:"standard-validators",level:3},{value:"Built-in sanitizers",id:"built-in-sanitizers",level:2},{value:".customSanitizer()",id:"customsanitizer",level:3},{value:".default()",id:"default",level:3},{value:".replace()",id:"replace",level:3},{value:".toArray()",id:"toarray",level:3},{value:".toLowerCase()",id:"tolowercase",level:3},{value:".toUpperCase()",id:"touppercase",level:3},{value:"Standard sanitizers",id:"standard-sanitizers",level:3},{value:"Modifiers",id:"modifiers",level:2},{value:".bail()",id:"bail",level:3},{value:".if()",id:"if",level:3},{value:".not()",id:"not",level:3},{value:".optional()",id:"optional",level:3},{value:".withMessage()",id:"withmessage",level:3}],g={toc:h};function v(e){var a=e.components,n=(0,i.Z)(e,s);return(0,l.kt)("wrapper",(0,t.Z)({},g,n,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"validationchain"},(0,l.kt)("inlineCode",{parentName:"h1"},"ValidationChain")),(0,l.kt)("p",null,"The validation chain contains all of the built-in validators, sanitizers and utility methods to fine\ntune the behaviour of the validation for a certain field or fields."),(0,l.kt)("p",null,"Validation chains are created by the ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/check"},(0,l.kt)("inlineCode",{parentName:"a"},"check()")," functions"),", and they can be used in a few ways:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"as express.js route handlers, which will run the validation automatically;"),(0,l.kt)("li",{parentName:"ul"},"as parameter of some of express-validator's other functions, like ",(0,l.kt)("inlineCode",{parentName:"li"},"oneOf()")," or ",(0,l.kt)("inlineCode",{parentName:"li"},"checkExact()"),";"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"/docs/next/guides/manually-running"},"standalone, where you have full control over when the validation runs and how"),".")),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"If you're writing a function that accepts a ",(0,l.kt)("inlineCode",{parentName:"p"},"ValidationChain"),", the TypeScript type can be imported using"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { ValidationChain } from 'express-validator';\n"))),(0,l.kt)("h2",{id:"built-in-validators"},"Built-in validators"),(0,l.kt)("h3",{id:"custom"},(0,l.kt)("inlineCode",{parentName:"h3"},".custom()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"custom(validator: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom validator function to the chain."),(0,l.kt)("p",null,"The field value will be valid if:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"The custom validator returns truthy; or"),(0,l.kt)("li",{parentName:"ul"},"The custom validator returns a promise that resolves.")),(0,l.kt)("p",null,"If the custom validator returns falsy, a promise that rejects, or if the function throws,\nthen the value will be considered invalid."),(0,l.kt)("p",null,"A common use case for ",(0,l.kt)("inlineCode",{parentName:"p"},".custom()")," is to verify that an e-mail address doesn't already exists.\nIf it does, return an error:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post(\n '/signup',\n body('email').custom(async value => {\n const existingUser = await Users.findUserByEmail(value);\n if (existingUser) {\n throw new Error('E-mail already in use');\n }\n }),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("h3",{id:"exists"},(0,l.kt)("inlineCode",{parentName:"h3"},".exists()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"exists(options?: {\n values?: 'undefined' | 'null' | 'falsy',\n checkNull?: boolean,\n checkFalsy?: boolean\n}): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check if the field exists."),(0,l.kt)("p",null,"Which values are considered existent depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),". By default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values don't exist")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values don't exist")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.checkNull")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),", respectively."),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"Using ",(0,l.kt)("inlineCode",{parentName:"p"},".exists()")," is only necessary if you aren't adding any other validator or sanitizer.")),(0,l.kt)("h3",{id:"isarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".isArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isArray(options?: { min?: number; max?: number }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an array.\nThis is analogous to ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray"},"the JavaScript function ",(0,l.kt)("inlineCode",{parentName:"a"},"Array.isArray(value)")),"."),(0,l.kt)("p",null,"You can also check that the array's length is greater than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.min")," and/or\nthat it's less than or equal to ",(0,l.kt)("inlineCode",{parentName:"p"},"options.max"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// Verifies that the friends list is an array\nbody('friends').isArray();\n\n// Verifies that ingredients is an array with length >= 0\nbody('ingredients').isArray({ min: 0 });\n\n// Verifies that team_members is an array with length >= 0 and <= 10\ncheck('team_members').isArray({ min: 0, max: 10 });\n")),(0,l.kt)("h3",{id:"isobject"},(0,l.kt)("inlineCode",{parentName:"h3"},".isObject()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isObject(options?: { strict?: boolean }): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is an object.\nFor example, ",(0,l.kt)("inlineCode",{parentName:"p"},"{}"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"{ foo: 'bar' }")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"new MyCustomClass()")," would all pass this validator."),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"strict")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then this validator works analogous to\n",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'object'")," in pure JavaScript"),",\nwhere both arrays and the ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," value are considered objects."),(0,l.kt)("h3",{id:"isstring"},(0,l.kt)("inlineCode",{parentName:"h3"},".isString()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"isString(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string.\nThis is analogous to a ",(0,l.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof"},(0,l.kt)("inlineCode",{parentName:"a"},"typeof value === 'string'")," in pure JavaScript"),"."),(0,l.kt)("h3",{id:"notempty"},(0,l.kt)("inlineCode",{parentName:"h3"},".notEmpty()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"notEmpty(): ValidationChain\n")),(0,l.kt)("p",null,"Adds a validator to check that a value is a string that's not empty.\nThis is analogous to ",(0,l.kt)("inlineCode",{parentName:"p"},".not().isEmpty()"),"."),(0,l.kt)("h3",{id:"standard-validators"},"Standard validators"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard validators ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(p,{mdxType:"ValidatorValidators"}),(0,l.kt)("h2",{id:"built-in-sanitizers"},"Built-in sanitizers"),(0,l.kt)("h3",{id:"customsanitizer"},(0,l.kt)("inlineCode",{parentName:"h3"},".customSanitizer()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"customSanitizer(sanitizer: (value, { req, location, path }) => any): ValidationChain\n")),(0,l.kt)("p",null,"Adds a custom sanitizer function to the chain.\nThe value returned by the function will become the new value of the field."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/object/:id', param('id').customSanitizer((value, { req }) => {\n // In this app, users have MongoDB style object IDs, everything else, numbers\n return req.query.type === 'user' ? ObjectId(value) : Number(value);\n})), (req, res) => {\n // Handle request\n});\n")),(0,l.kt)("h3",{id:"default"},(0,l.kt)("inlineCode",{parentName:"h3"},".default()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"default(defaultValue: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field if it's either an empty string, ",(0,l.kt)("inlineCode",{parentName:"p"},"null"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),", or ",(0,l.kt)("inlineCode",{parentName:"p"},"NaN"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').default('foo'), (req, res, next) => {\n // 'bar' => 'bar'\n // '' => 'foo'\n // undefined => 'foo'\n // null => 'foo'\n // NaN => 'foo'\n});\n")),(0,l.kt)("h3",{id:"replace"},(0,l.kt)("inlineCode",{parentName:"h3"},".replace()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"replace(valuesFrom: any[], valueTo: any): ValidationChain\n")),(0,l.kt)("p",null,"Replaces the value of the field with ",(0,l.kt)("inlineCode",{parentName:"p"},"valueTo")," whenever the current value is in ",(0,l.kt)("inlineCode",{parentName:"p"},"valuesFrom"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.post('/', body('username').replace(['bar', 'BAR'], 'foo'), (req, res, next) => {\n // 'bar_' => 'bar_'\n // 'bar' => 'foo'\n // 'BAR' => 'foo'\n console.log(req.body.username);\n});\n")),(0,l.kt)("h3",{id:"toarray"},(0,l.kt)("inlineCode",{parentName:"h3"},".toArray()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toArray(): ValidationChain\n")),(0,l.kt)("p",null,"Transforms the value to an array. If it already is one, nothing is done. ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined")," values become empty arrays."),(0,l.kt)("h3",{id:"tolowercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toLowerCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toLowerCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to lower case. If not a string, does nothing."),(0,l.kt)("h3",{id:"touppercase"},(0,l.kt)("inlineCode",{parentName:"h3"},".toUpperCase()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"toUpperCase(): ValidationChain\n")),(0,l.kt)("p",null,"Converts the value to upper case. If not a string, does nothing."),(0,l.kt)("h3",{id:"standard-sanitizers"},"Standard sanitizers"),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Please check the documentation on standard sanitizers ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/guides/validation-chain#standard-validatorssanitizers"},"here"),".")),(0,l.kt)(k,{mdxType:"ValidatorSanitizers"}),(0,l.kt)("h2",{id:"modifiers"},"Modifiers"),(0,l.kt)("h3",{id:"bail"},(0,l.kt)("inlineCode",{parentName:"h3"},".bail()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"bail(options?: { level: 'chain' | 'request' }): ValidationChain\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Parameters:")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Name"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"options.level")),(0,l.kt)("td",{parentName:"tr",align:null},"The level at which the validation chain should be stopped. Defaults to ",(0,l.kt)("inlineCode",{parentName:"td"},"chain"),".")))),(0,l.kt)("p",null,"Stops running the validation chain if any of the previous validators failed."),(0,l.kt)("p",null,"This is useful to prevent a custom validator that touches a database or external API from running\nwhen you know it will fail."),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},".bail()")," can be used multiple times in the same validation chain if desired:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('username')\n .isEmail()\n // If not an email, stop here\n .bail()\n .custom(checkDenylistDomain)\n // If domain is not allowed, don't go check if it already exists\n .bail()\n .custom(checkEmailExists);\n")),(0,l.kt)("p",null,"If the ",(0,l.kt)("inlineCode",{parentName:"p"},"level")," option is set to ",(0,l.kt)("inlineCode",{parentName:"p"},"request"),", then also no further validation chains will run on the current request.\nFor example:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"app.get(\n '/search',\n query('query').notEmpty().bail({ level: 'request' }),\n // If `query` is empty, then the following validation chains won't run:\n query('query_type').isIn(['user', 'posts']),\n query('num_results').isInt(),\n (req, res) => {\n // Handle request\n },\n);\n")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Functions such as ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/one-of"},(0,l.kt)("inlineCode",{parentName:"a"},"oneOf()"))," and ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/check-exact"},(0,l.kt)("inlineCode",{parentName:"a"},"checkExact()"))," can become slower\nwhen using request-level bail, since validation chains that would normally run in parallel need to\nrun in sequence.")),(0,l.kt)("h3",{id:"if"},(0,l.kt)("inlineCode",{parentName:"h3"},".if()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"if(condition: CustomValidator | ContextRunner): ValidationChain\n")),(0,l.kt)("p",null,"Adds a condition on whether the validation chain should continue running on a field or not."),(0,l.kt)("p",null,"The condition may be either a ",(0,l.kt)("a",{parentName:"p",href:"#custom"},"custom validator")," or a ",(0,l.kt)("a",{parentName:"p",href:"/docs/next/api/misc#contextrunner"},(0,l.kt)("inlineCode",{parentName:"a"},"ContextRunner")," instance"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"body('newPassword')\n // Only validate if the old password has been provided\n .if((value, { req }) => req.body.oldPassword)\n // Or, use a validation chain instead\n .if(body('oldPassword').notEmpty())\n // The length of the new password will only be checked if `oldPassword` is provided.\n .isLength({ min: 6 });\n")),(0,l.kt)("h3",{id:"not"},(0,l.kt)("inlineCode",{parentName:"h3"},".not()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"not(): ValidationChain\n")),(0,l.kt)("p",null,"Negates the result of the next validator in the chain."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"check('weekday').not().isIn(['sunday', 'saturday']);\n")),(0,l.kt)("h3",{id:"optional"},(0,l.kt)("inlineCode",{parentName:"h3"},".optional()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"optional(options?: boolean | {\n values?: 'undefined' | 'null' | 'falsy',\n nullable?: boolean,\n checkFalsy?: boolean,\n}): ValidationChain\n")),(0,l.kt)("p",null,"Marks the current validation chain as optional.\nAn optional field skips validation depending on its value, instead of failing it."),(0,l.kt)("p",null,"Which values are considered optional depends on ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values"),".\nBy default, it's set to ",(0,l.kt)("inlineCode",{parentName:"p"},"undefined"),":"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"options.values")),(0,l.kt)("th",{parentName:"tr",align:null},"Behavior"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null")),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," values are optional")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"falsy")),(0,l.kt)("td",{parentName:"tr",align:null},"Falsy values (empty strings, ",(0,l.kt)("inlineCode",{parentName:"td"},"0"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"false"),", ",(0,l.kt)("inlineCode",{parentName:"td"},"null")," and ",(0,l.kt)("inlineCode",{parentName:"td"},"undefined")," values are optional")))),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"options.nullable")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"options.checkFalsy")," are deprecated options.\nThey are aliases to setting ",(0,l.kt)("inlineCode",{parentName:"p"},"options.values")," to ",(0,l.kt)("inlineCode",{parentName:"p"},"null")," or ",(0,l.kt)("inlineCode",{parentName:"p"},"falsy"),"."),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"options")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"false"),", then the field won't be optional."),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Unlike validators and sanitizers, ",(0,l.kt)("inlineCode",{parentName:"p"},".optional()")," is not positional: it'll affect how values are interpreted,\nno matter where it happens in the chain."),(0,l.kt)("p",{parentName:"admonition"},"For example, there are no differences between this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').isLength({ max: 100 }).isJSON().optional().\n")),(0,l.kt)("p",{parentName:"admonition"},"and this:"),(0,l.kt)("pre",{parentName:"admonition"},(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"body('json_string').optional().isLength({ max: 100 }).isJSON().\n"))),(0,l.kt)("h3",{id:"withmessage"},(0,l.kt)("inlineCode",{parentName:"h3"},".withMessage()")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"withMessage(message: any): ValidationChain\n")),(0,l.kt)("p",null,"Sets the error message used by the previous validator."))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f7e82b99.f8b1b1e5.js b/assets/js/f7e82b99.f8b1b1e5.js new file mode 100644 index 0000000..270b663 --- /dev/null +++ b/assets/js/f7e82b99.f8b1b1e5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6805],{5745:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/main.73361ce3.js b/assets/js/main.73361ce3.js deleted file mode 100644 index 660525e..0000000 --- a/assets/js/main.73361ce3.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.73361ce3.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[179],{6573:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});var a=n(7378);function i(){return a.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},a.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},3427:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,t:()=>r});var a=n(7378),i=a.createContext(!1);function r(e){var t=e.children,n=(0,a.useState)(!1),r=n[0],o=n[1];return(0,a.useEffect)((function(){o(!0)}),[]),a.createElement(i.Provider,{value:r},t)}},3375:(e,t,n)=>{"use strict";var a=n(7378),i=n(1542),r=n(4289),o=n(2883),s=n(161);const c=[n(142),n(3815),n(4374),n(2128)];var l=n(6623),d=n(3620),u=n(5473);function p(e){var t=e.children;return a.createElement(a.Fragment,null,t)}var f=n(5773),m=n(7092),h=n(353),v=n(8948),b=n(624),g=n(1123),y=n(3714),w=n(174),k=n(3149),_=n(505);function x(){var e=(0,h.Z)().i18n,t=e.defaultLocale,n=e.localeConfigs,i=(0,y.l)();return a.createElement(m.Z,null,Object.entries(n).map((function(e){var t=e[0],n=e[1].htmlLang;return a.createElement("link",{key:t,rel:"alternate",href:i.createUrl({locale:t,fullyQualified:!0}),hrefLang:n})})),a.createElement("link",{rel:"alternate",href:i.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}))}function E(e){var t=e.permalink,n=(0,h.Z)().siteConfig.url,i=function(){var e=(0,h.Z)().siteConfig.url,t=(0,d.TH)().pathname;return e+(0,v.Z)(t)}(),r=t?""+n+t:i;return a.createElement(m.Z,null,a.createElement("meta",{property:"og:url",content:r}),a.createElement("link",{rel:"canonical",href:r}))}function S(){var e=(0,h.Z)().i18n.currentLocale,t=(0,b.L)(),n=t.metadata,i=t.image;return a.createElement(a.Fragment,null,a.createElement(m.Z,null,a.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),a.createElement("body",{className:w.h})),i&&a.createElement(g.d,{image:i}),a.createElement(E,null),a.createElement(x,null),a.createElement(_.Z,{tag:k.HX,locale:e}),a.createElement(m.Z,null,n.map((function(e,t){return a.createElement("meta",(0,f.Z)({key:t},e))}))))}var T=new Map;function C(e){if(T.has(e.pathname))return Object.assign({},e,{pathname:T.get(e.pathname)});if((0,u.f)(l.Z,e.pathname).some((function(e){return!0===e.route.exact})))return T.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),Object.assign({},e,{pathname:t})}var A=n(3427),P=n(3340),R=n(3219);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/{"use strict";n.d(t,{_:()=>d,M:()=>u});var a=n(7378),i=n(6809);const r=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":false,"path":"/docs/next","mainDocId":"index","docs":[{"id":"api/check","path":"/docs/next/api/check","sidebar":"api"},{"id":"api/check-exact","path":"/docs/next/api/check-exact","sidebar":"api"},{"id":"api/check-schema","path":"/docs/next/api/check-schema","sidebar":"api"},{"id":"api/express-validator","path":"/docs/next/api/express-validator","sidebar":"api"},{"id":"api/matched-data","path":"/docs/next/api/matched-data","sidebar":"api"},{"id":"api/misc","path":"/docs/next/api/misc","sidebar":"api"},{"id":"api/one-of","path":"/docs/next/api/one-of","sidebar":"api"},{"id":"api/validation-chain","path":"/docs/next/api/validation-chain","sidebar":"api"},{"id":"api/validation-result","path":"/docs/next/api/validation-result","sidebar":"api"},{"id":"architecture","path":"/docs/next/architecture"},{"id":"guides/customizing","path":"/docs/next/guides/customizing","sidebar":"docs"},{"id":"guides/field-selection","path":"/docs/next/guides/field-selection","sidebar":"docs"},{"id":"guides/getting-started","path":"/docs/next/guides/getting-started","sidebar":"docs"},{"id":"guides/manually-running","path":"/docs/next/guides/manually-running","sidebar":"docs"},{"id":"guides/schema-validation","path":"/docs/next/guides/schema-validation","sidebar":"docs"},{"id":"guides/validation-chain","path":"/docs/next/guides/validation-chain","sidebar":"docs"},{"id":"index","path":"/docs/next/","sidebar":"docs"},{"id":"migration-v5-to-v6","path":"/docs/next/migration-v5-to-v6","sidebar":"docs"},{"id":"migration-v6-to-v7","path":"/docs/next/migration-v6-to-v7","sidebar":"docs"},{"id":"/category/guides","path":"/docs/next/category/guides","sidebar":"docs"},{"id":"/category/migrating","path":"/docs/next/category/migrating","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/next/","label":"Introduction"}},"api":{"link":{"path":"/docs/next/api/check","label":"api/check"}}}},{"name":"7.0.0","label":"7.0.0","isLast":true,"path":"/docs","mainDocId":"index","docs":[{"id":"api/check","path":"/docs/api/check","sidebar":"api"},{"id":"api/check-exact","path":"/docs/api/check-exact","sidebar":"api"},{"id":"api/check-schema","path":"/docs/api/check-schema","sidebar":"api"},{"id":"api/express-validator","path":"/docs/api/express-validator","sidebar":"api"},{"id":"api/matched-data","path":"/docs/api/matched-data","sidebar":"api"},{"id":"api/misc","path":"/docs/api/misc","sidebar":"api"},{"id":"api/one-of","path":"/docs/api/one-of","sidebar":"api"},{"id":"api/validation-chain","path":"/docs/api/validation-chain","sidebar":"api"},{"id":"api/validation-result","path":"/docs/api/validation-result","sidebar":"api"},{"id":"architecture","path":"/docs/architecture"},{"id":"guides/customizing","path":"/docs/guides/customizing","sidebar":"docs"},{"id":"guides/field-selection","path":"/docs/guides/field-selection","sidebar":"docs"},{"id":"guides/getting-started","path":"/docs/guides/getting-started","sidebar":"docs"},{"id":"guides/manually-running","path":"/docs/guides/manually-running","sidebar":"docs"},{"id":"guides/schema-validation","path":"/docs/guides/schema-validation","sidebar":"docs"},{"id":"guides/validation-chain","path":"/docs/guides/validation-chain","sidebar":"docs"},{"id":"index","path":"/docs/","sidebar":"docs"},{"id":"migration-v5-to-v6","path":"/docs/migration-v5-to-v6","sidebar":"docs"},{"id":"migration-v6-to-v7","path":"/docs/migration-v6-to-v7","sidebar":"docs"},{"id":"/category/guides","path":"/docs/category/guides","sidebar":"docs"},{"id":"/category/migrating","path":"/docs/category/migrating","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/","label":"Introduction"}},"api":{"link":{"path":"/docs/api/check","label":"api/check"}}}},{"name":"6.15.0","label":"6.15.0","isLast":false,"path":"/docs/6.15.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.15.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.15.0/custom-error-messages","sidebar":"docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.15.0/custom-validators-sanitizers","sidebar":"docs"},{"id":"faq","path":"/docs/6.15.0/faq","sidebar":"docs"},{"id":"filter-api","path":"/docs/6.15.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.15.0/","sidebar":"docs"},{"id":"matched-data-api","path":"/docs/6.15.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.15.0/migration-v5-to-v6","sidebar":"docs"},{"id":"running-imperatively","path":"/docs/6.15.0/running-imperatively","sidebar":"docs"},{"id":"sanitization","path":"/docs/6.15.0/sanitization","sidebar":"docs"},{"id":"sanitization-chain-api","path":"/docs/6.15.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.15.0/schema-validation","sidebar":"docs"},{"id":"validation-chain-api","path":"/docs/6.15.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.15.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.15.0/whole-body-validation","sidebar":"docs"},{"id":"wildcards","path":"/docs/6.15.0/wildcards","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/6.15.0/","label":"index"}},"api":{"link":{"path":"/docs/6.15.0/check-api","label":"check-api"}}}},{"name":"6.14.0","label":"6.14.0","isLast":false,"path":"/docs/6.14.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.14.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.14.0/custom-error-messages","sidebar":"version-6.14.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.14.0/custom-validators-sanitizers","sidebar":"version-6.14.0/docs"},{"id":"faq","path":"/docs/6.14.0/faq","sidebar":"version-6.14.0/docs"},{"id":"filter-api","path":"/docs/6.14.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.14.0/","sidebar":"version-6.14.0/docs"},{"id":"matched-data-api","path":"/docs/6.14.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.14.0/migration-v5-to-v6","sidebar":"version-6.14.0/docs"},{"id":"running-imperatively","path":"/docs/6.14.0/running-imperatively","sidebar":"version-6.14.0/docs"},{"id":"sanitization","path":"/docs/6.14.0/sanitization","sidebar":"version-6.14.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.14.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.14.0/schema-validation","sidebar":"version-6.14.0/docs"},{"id":"validation-chain-api","path":"/docs/6.14.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.14.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.14.0/whole-body-validation","sidebar":"version-6.14.0/docs"},{"id":"wildcards","path":"/docs/6.14.0/wildcards","sidebar":"version-6.14.0/docs"}],"draftIds":[],"sidebars":{"version-6.14.0/docs":{"link":{"path":"/docs/6.14.0/","label":"version-6.14.0/index"}},"api":{"link":{"path":"/docs/6.14.0/check-api","label":"version-6.14.0/check-api"}}}},{"name":"6.13.0","label":"6.13.0","isLast":false,"path":"/docs/6.13.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.13.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.13.0/custom-error-messages","sidebar":"version-6.13.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.13.0/custom-validators-sanitizers","sidebar":"version-6.13.0/docs"},{"id":"faq","path":"/docs/6.13.0/faq","sidebar":"version-6.13.0/docs"},{"id":"filter-api","path":"/docs/6.13.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.13.0/","sidebar":"version-6.13.0/docs"},{"id":"matched-data-api","path":"/docs/6.13.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.13.0/migration-v5-to-v6","sidebar":"version-6.13.0/docs"},{"id":"running-imperatively","path":"/docs/6.13.0/running-imperatively","sidebar":"version-6.13.0/docs"},{"id":"sanitization","path":"/docs/6.13.0/sanitization","sidebar":"version-6.13.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.13.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.13.0/schema-validation","sidebar":"version-6.13.0/docs"},{"id":"validation-chain-api","path":"/docs/6.13.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.13.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.13.0/whole-body-validation","sidebar":"version-6.13.0/docs"},{"id":"wildcards","path":"/docs/6.13.0/wildcards","sidebar":"version-6.13.0/docs"}],"draftIds":[],"sidebars":{"version-6.13.0/docs":{"link":{"path":"/docs/6.13.0/","label":"version-6.13.0/index"}},"api":{"link":{"path":"/docs/6.13.0/check-api","label":"version-6.13.0/check-api"}}}},{"name":"6.12.0","label":"6.12.0","isLast":false,"path":"/docs/6.12.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.12.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.12.0/custom-error-messages","sidebar":"version-6.12.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.12.0/custom-validators-sanitizers","sidebar":"version-6.12.0/docs"},{"id":"faq","path":"/docs/6.12.0/faq","sidebar":"version-6.12.0/docs"},{"id":"filter-api","path":"/docs/6.12.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.12.0/","sidebar":"version-6.12.0/docs"},{"id":"matched-data-api","path":"/docs/6.12.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.12.0/migration-v5-to-v6","sidebar":"version-6.12.0/docs"},{"id":"running-imperatively","path":"/docs/6.12.0/running-imperatively","sidebar":"version-6.12.0/docs"},{"id":"sanitization","path":"/docs/6.12.0/sanitization","sidebar":"version-6.12.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.12.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.12.0/schema-validation","sidebar":"version-6.12.0/docs"},{"id":"validation-chain-api","path":"/docs/6.12.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.12.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.12.0/whole-body-validation","sidebar":"version-6.12.0/docs"},{"id":"wildcards","path":"/docs/6.12.0/wildcards","sidebar":"version-6.12.0/docs"}],"draftIds":[],"sidebars":{"version-6.12.0/docs":{"link":{"path":"/docs/6.12.0/","label":"version-6.12.0/index"}},"api":{"link":{"path":"/docs/6.12.0/check-api","label":"version-6.12.0/check-api"}}}},{"name":"6.11.0","label":"6.11.0","isLast":false,"path":"/docs/6.11.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.11.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.11.0/custom-error-messages","sidebar":"version-6.11.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.11.0/custom-validators-sanitizers","sidebar":"version-6.11.0/docs"},{"id":"faq","path":"/docs/6.11.0/faq","sidebar":"version-6.11.0/docs"},{"id":"filter-api","path":"/docs/6.11.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.11.0/","sidebar":"version-6.11.0/docs"},{"id":"matched-data-api","path":"/docs/6.11.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.11.0/migration-v5-to-v6","sidebar":"version-6.11.0/docs"},{"id":"running-imperatively","path":"/docs/6.11.0/running-imperatively","sidebar":"version-6.11.0/docs"},{"id":"sanitization","path":"/docs/6.11.0/sanitization","sidebar":"version-6.11.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.11.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.11.0/schema-validation","sidebar":"version-6.11.0/docs"},{"id":"validation-chain-api","path":"/docs/6.11.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.11.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.11.0/whole-body-validation","sidebar":"version-6.11.0/docs"},{"id":"wildcards","path":"/docs/6.11.0/wildcards","sidebar":"version-6.11.0/docs"}],"draftIds":[],"sidebars":{"version-6.11.0/docs":{"link":{"path":"/docs/6.11.0/","label":"version-6.11.0/index"}},"api":{"link":{"path":"/docs/6.11.0/check-api","label":"version-6.11.0/check-api"}}}},{"name":"6.10.0","label":"6.10.0","isLast":false,"path":"/docs/6.10.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.10.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.10.0/custom-error-messages","sidebar":"version-6.10.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.10.0/custom-validators-sanitizers","sidebar":"version-6.10.0/docs"},{"id":"faq","path":"/docs/6.10.0/faq","sidebar":"version-6.10.0/docs"},{"id":"filter-api","path":"/docs/6.10.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.10.0/","sidebar":"version-6.10.0/docs"},{"id":"matched-data-api","path":"/docs/6.10.0/matched-data-api","sidebar":"api"},{"id":"migration-v5-to-v6","path":"/docs/6.10.0/migration-v5-to-v6","sidebar":"version-6.10.0/docs"},{"id":"running-imperatively","path":"/docs/6.10.0/running-imperatively","sidebar":"version-6.10.0/docs"},{"id":"sanitization","path":"/docs/6.10.0/sanitization","sidebar":"version-6.10.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.10.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.10.0/schema-validation","sidebar":"version-6.10.0/docs"},{"id":"validation-chain-api","path":"/docs/6.10.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.10.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.10.0/whole-body-validation","sidebar":"version-6.10.0/docs"},{"id":"wildcards","path":"/docs/6.10.0/wildcards","sidebar":"version-6.10.0/docs"}],"draftIds":[],"sidebars":{"version-6.10.0/docs":{"link":{"path":"/docs/6.10.0/","label":"version-6.10.0/index"}},"api":{"link":{"path":"/docs/6.10.0/check-api","label":"version-6.10.0/check-api"}}}},{"name":"6.9.0","label":"6.9.0","isLast":false,"path":"/docs/6.9.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.9.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.9.0/custom-error-messages","sidebar":"version-6.9.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.9.0/custom-validators-sanitizers","sidebar":"version-6.9.0/docs"},{"id":"filter-api","path":"/docs/6.9.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.9.0/","sidebar":"version-6.9.0/docs"},{"id":"matched-data-api","path":"/docs/6.9.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.9.0/running-imperatively","sidebar":"version-6.9.0/docs"},{"id":"sanitization","path":"/docs/6.9.0/sanitization","sidebar":"version-6.9.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.9.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.9.0/schema-validation","sidebar":"version-6.9.0/docs"},{"id":"validation-chain-api","path":"/docs/6.9.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.9.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.9.0/whole-body-validation","sidebar":"version-6.9.0/docs"},{"id":"wildcards","path":"/docs/6.9.0/wildcards","sidebar":"version-6.9.0/docs"}],"draftIds":[],"sidebars":{"version-6.9.0/docs":{"link":{"path":"/docs/6.9.0/","label":"version-6.9.0/index"}},"api":{"link":{"path":"/docs/6.9.0/check-api","label":"version-6.9.0/check-api"}}}},{"name":"6.8.0","label":"6.8.0","isLast":false,"path":"/docs/6.8.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.8.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.8.0/custom-error-messages","sidebar":"version-6.8.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.8.0/custom-validators-sanitizers","sidebar":"version-6.8.0/docs"},{"id":"filter-api","path":"/docs/6.8.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.8.0/","sidebar":"version-6.8.0/docs"},{"id":"matched-data-api","path":"/docs/6.8.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.8.0/running-imperatively","sidebar":"version-6.8.0/docs"},{"id":"sanitization","path":"/docs/6.8.0/sanitization","sidebar":"version-6.8.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.8.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.8.0/schema-validation","sidebar":"version-6.8.0/docs"},{"id":"validation-chain-api","path":"/docs/6.8.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.8.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.8.0/whole-body-validation","sidebar":"version-6.8.0/docs"},{"id":"wildcards","path":"/docs/6.8.0/wildcards","sidebar":"version-6.8.0/docs"}],"draftIds":[],"sidebars":{"version-6.8.0/docs":{"link":{"path":"/docs/6.8.0/","label":"version-6.8.0/index"}},"api":{"link":{"path":"/docs/6.8.0/check-api","label":"version-6.8.0/check-api"}}}},{"name":"6.7.0","label":"6.7.0","isLast":false,"path":"/docs/6.7.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.7.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.7.0/custom-error-messages","sidebar":"version-6.7.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.7.0/custom-validators-sanitizers","sidebar":"version-6.7.0/docs"},{"id":"filter-api","path":"/docs/6.7.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.7.0/","sidebar":"version-6.7.0/docs"},{"id":"matched-data-api","path":"/docs/6.7.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.7.0/running-imperatively","sidebar":"version-6.7.0/docs"},{"id":"sanitization","path":"/docs/6.7.0/sanitization","sidebar":"version-6.7.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.7.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.7.0/schema-validation","sidebar":"version-6.7.0/docs"},{"id":"validation-chain-api","path":"/docs/6.7.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.7.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.7.0/whole-body-validation","sidebar":"version-6.7.0/docs"},{"id":"wildcards","path":"/docs/6.7.0/wildcards","sidebar":"version-6.7.0/docs"}],"draftIds":[],"sidebars":{"version-6.7.0/docs":{"link":{"path":"/docs/6.7.0/","label":"version-6.7.0/index"}},"api":{"link":{"path":"/docs/6.7.0/check-api","label":"version-6.7.0/check-api"}}}},{"name":"6.6.0","label":"6.6.0","isLast":false,"path":"/docs/6.6.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.6.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.6.0/custom-error-messages","sidebar":"version-6.6.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.6.0/custom-validators-sanitizers","sidebar":"version-6.6.0/docs"},{"id":"filter-api","path":"/docs/6.6.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.6.0/","sidebar":"version-6.6.0/docs"},{"id":"matched-data-api","path":"/docs/6.6.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.6.0/running-imperatively","sidebar":"version-6.6.0/docs"},{"id":"sanitization","path":"/docs/6.6.0/sanitization","sidebar":"version-6.6.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.6.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.6.0/schema-validation","sidebar":"version-6.6.0/docs"},{"id":"validation-chain-api","path":"/docs/6.6.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.6.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.6.0/whole-body-validation","sidebar":"version-6.6.0/docs"},{"id":"wildcards","path":"/docs/6.6.0/wildcards","sidebar":"version-6.6.0/docs"}],"draftIds":[],"sidebars":{"version-6.6.0/docs":{"link":{"path":"/docs/6.6.0/","label":"version-6.6.0/index"}},"api":{"link":{"path":"/docs/6.6.0/check-api","label":"version-6.6.0/check-api"}}}},{"name":"6.5.0","label":"6.5.0","isLast":false,"path":"/docs/6.5.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.5.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.5.0/custom-error-messages","sidebar":"version-6.5.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.5.0/custom-validators-sanitizers","sidebar":"version-6.5.0/docs"},{"id":"filter-api","path":"/docs/6.5.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.5.0/","sidebar":"version-6.5.0/docs"},{"id":"matched-data-api","path":"/docs/6.5.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.5.0/running-imperatively","sidebar":"version-6.5.0/docs"},{"id":"sanitization","path":"/docs/6.5.0/sanitization","sidebar":"version-6.5.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.5.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.5.0/schema-validation","sidebar":"version-6.5.0/docs"},{"id":"validation-chain-api","path":"/docs/6.5.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.5.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.5.0/whole-body-validation","sidebar":"version-6.5.0/docs"},{"id":"wildcards","path":"/docs/6.5.0/wildcards","sidebar":"version-6.5.0/docs"}],"draftIds":[],"sidebars":{"version-6.5.0/docs":{"link":{"path":"/docs/6.5.0/","label":"version-6.5.0/index"}},"api":{"link":{"path":"/docs/6.5.0/check-api","label":"version-6.5.0/check-api"}}}},{"name":"6.4.0","label":"6.4.0","isLast":false,"path":"/docs/6.4.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.4.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.4.0/custom-error-messages","sidebar":"version-6.4.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.4.0/custom-validators-sanitizers","sidebar":"version-6.4.0/docs"},{"id":"filter-api","path":"/docs/6.4.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.4.0/","sidebar":"version-6.4.0/docs"},{"id":"matched-data-api","path":"/docs/6.4.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.4.0/running-imperatively","sidebar":"version-6.4.0/docs"},{"id":"sanitization","path":"/docs/6.4.0/sanitization","sidebar":"version-6.4.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.4.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.4.0/schema-validation","sidebar":"version-6.4.0/docs"},{"id":"validation-chain-api","path":"/docs/6.4.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.4.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.4.0/whole-body-validation","sidebar":"version-6.4.0/docs"},{"id":"wildcards","path":"/docs/6.4.0/wildcards","sidebar":"version-6.4.0/docs"}],"draftIds":[],"sidebars":{"version-6.4.0/docs":{"link":{"path":"/docs/6.4.0/","label":"version-6.4.0/index"}},"api":{"link":{"path":"/docs/6.4.0/check-api","label":"version-6.4.0/check-api"}}}},{"name":"6.3.0","label":"6.3.0","isLast":false,"path":"/docs/6.3.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.3.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.3.0/custom-error-messages","sidebar":"version-6.3.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.3.0/custom-validators-sanitizers","sidebar":"version-6.3.0/docs"},{"id":"filter-api","path":"/docs/6.3.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.3.0/","sidebar":"version-6.3.0/docs"},{"id":"matched-data-api","path":"/docs/6.3.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.3.0/running-imperatively","sidebar":"version-6.3.0/docs"},{"id":"sanitization","path":"/docs/6.3.0/sanitization","sidebar":"version-6.3.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.3.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.3.0/schema-validation","sidebar":"version-6.3.0/docs"},{"id":"validation-chain-api","path":"/docs/6.3.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.3.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.3.0/whole-body-validation","sidebar":"version-6.3.0/docs"},{"id":"wildcards","path":"/docs/6.3.0/wildcards","sidebar":"version-6.3.0/docs"}],"draftIds":[],"sidebars":{"version-6.3.0/docs":{"link":{"path":"/docs/6.3.0/","label":"version-6.3.0/index"}},"api":{"link":{"path":"/docs/6.3.0/check-api","label":"version-6.3.0/check-api"}}}},{"name":"6.2.0","label":"6.2.0","isLast":false,"path":"/docs/6.2.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.2.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.2.0/custom-error-messages","sidebar":"version-6.2.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.2.0/custom-validators-sanitizers","sidebar":"version-6.2.0/docs"},{"id":"filter-api","path":"/docs/6.2.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.2.0/","sidebar":"version-6.2.0/docs"},{"id":"matched-data-api","path":"/docs/6.2.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.2.0/running-imperatively","sidebar":"version-6.2.0/docs"},{"id":"sanitization","path":"/docs/6.2.0/sanitization","sidebar":"version-6.2.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.2.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.2.0/schema-validation","sidebar":"version-6.2.0/docs"},{"id":"validation-chain-api","path":"/docs/6.2.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.2.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.2.0/whole-body-validation","sidebar":"version-6.2.0/docs"},{"id":"wildcards","path":"/docs/6.2.0/wildcards","sidebar":"version-6.2.0/docs"}],"draftIds":[],"sidebars":{"version-6.2.0/docs":{"link":{"path":"/docs/6.2.0/","label":"version-6.2.0/index"}},"api":{"link":{"path":"/docs/6.2.0/check-api","label":"version-6.2.0/check-api"}}}},{"name":"6.1.0","label":"6.1.0","isLast":false,"path":"/docs/6.1.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.1.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.1.0/custom-error-messages","sidebar":"version-6.1.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.1.0/custom-validators-sanitizers","sidebar":"version-6.1.0/docs"},{"id":"filter-api","path":"/docs/6.1.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.1.0/","sidebar":"version-6.1.0/docs"},{"id":"matched-data-api","path":"/docs/6.1.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.1.0/running-imperatively","sidebar":"version-6.1.0/docs"},{"id":"sanitization","path":"/docs/6.1.0/sanitization","sidebar":"version-6.1.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.1.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.1.0/schema-validation","sidebar":"version-6.1.0/docs"},{"id":"validation-chain-api","path":"/docs/6.1.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.1.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.1.0/whole-body-validation","sidebar":"version-6.1.0/docs"},{"id":"wildcards","path":"/docs/6.1.0/wildcards","sidebar":"version-6.1.0/docs"}],"draftIds":[],"sidebars":{"version-6.1.0/docs":{"link":{"path":"/docs/6.1.0/","label":"version-6.1.0/index"}},"api":{"link":{"path":"/docs/6.1.0/check-api","label":"version-6.1.0/check-api"}}}},{"name":"6.0.0","label":"6.0.0","isLast":false,"path":"/docs/6.0.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/6.0.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/6.0.0/custom-error-messages","sidebar":"version-6.0.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/6.0.0/custom-validators-sanitizers","sidebar":"version-6.0.0/docs"},{"id":"filter-api","path":"/docs/6.0.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/6.0.0/","sidebar":"version-6.0.0/docs"},{"id":"matched-data-api","path":"/docs/6.0.0/matched-data-api","sidebar":"api"},{"id":"running-imperatively","path":"/docs/6.0.0/running-imperatively","sidebar":"version-6.0.0/docs"},{"id":"sanitization","path":"/docs/6.0.0/sanitization","sidebar":"version-6.0.0/docs"},{"id":"sanitization-chain-api","path":"/docs/6.0.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/6.0.0/schema-validation","sidebar":"version-6.0.0/docs"},{"id":"validation-chain-api","path":"/docs/6.0.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/6.0.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/6.0.0/whole-body-validation","sidebar":"version-6.0.0/docs"},{"id":"wildcards","path":"/docs/6.0.0/wildcards","sidebar":"version-6.0.0/docs"}],"draftIds":[],"sidebars":{"version-6.0.0/docs":{"link":{"path":"/docs/6.0.0/","label":"version-6.0.0/index"}},"api":{"link":{"path":"/docs/6.0.0/check-api","label":"version-6.0.0/check-api"}}}},{"name":"5.3.0","label":"5.3.0","isLast":false,"path":"/docs/5.3.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/5.3.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/5.3.0/custom-error-messages","sidebar":"version-5.3.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/5.3.0/custom-validators-sanitizers","sidebar":"version-5.3.0/docs"},{"id":"filter-api","path":"/docs/5.3.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/5.3.0/","sidebar":"version-5.3.0/docs"},{"id":"legacy-api","path":"/docs/5.3.0/legacy-api","sidebar":"api"},{"id":"sanitization","path":"/docs/5.3.0/sanitization","sidebar":"version-5.3.0/docs"},{"id":"sanitization-chain-api","path":"/docs/5.3.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/5.3.0/schema-validation","sidebar":"version-5.3.0/docs"},{"id":"validation-chain-api","path":"/docs/5.3.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/5.3.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/5.3.0/whole-body-validation","sidebar":"version-5.3.0/docs"},{"id":"wildcards","path":"/docs/5.3.0/wildcards","sidebar":"version-5.3.0/docs"}],"draftIds":[],"sidebars":{"version-5.3.0/docs":{"link":{"path":"/docs/5.3.0/","label":"version-5.3.0/index"}},"api":{"link":{"path":"/docs/5.3.0/check-api","label":"version-5.3.0/check-api"}}}},{"name":"5.2.0","label":"5.2.0","isLast":false,"path":"/docs/5.2.0","mainDocId":"index","docs":[{"id":"check-api","path":"/docs/5.2.0/check-api","sidebar":"api"},{"id":"custom-error-messages","path":"/docs/5.2.0/custom-error-messages","sidebar":"version-5.2.0/docs"},{"id":"custom-validators-sanitizers","path":"/docs/5.2.0/custom-validators-sanitizers","sidebar":"version-5.2.0/docs"},{"id":"filter-api","path":"/docs/5.2.0/filter-api","sidebar":"api"},{"id":"index","path":"/docs/5.2.0/","sidebar":"version-5.2.0/docs"},{"id":"legacy-api","path":"/docs/5.2.0/legacy-api","sidebar":"api"},{"id":"sanitization","path":"/docs/5.2.0/sanitization","sidebar":"version-5.2.0/docs"},{"id":"sanitization-chain-api","path":"/docs/5.2.0/sanitization-chain-api","sidebar":"api"},{"id":"schema-validation","path":"/docs/5.2.0/schema-validation","sidebar":"version-5.2.0/docs"},{"id":"validation-chain-api","path":"/docs/5.2.0/validation-chain-api","sidebar":"api"},{"id":"validation-result-api","path":"/docs/5.2.0/validation-result-api","sidebar":"api"},{"id":"whole-body-validation","path":"/docs/5.2.0/whole-body-validation","sidebar":"version-5.2.0/docs"},{"id":"wildcards","path":"/docs/5.2.0/wildcards","sidebar":"version-5.2.0/docs"}],"draftIds":[],"sidebars":{"version-5.2.0/docs":{"link":{"path":"/docs/5.2.0/","label":"version-5.2.0/index"}},"api":{"link":{"path":"/docs/5.2.0/check-api","label":"version-5.2.0/check-api"}}}}],"breadcrumbs":true}}}'),o=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(7529);const c=JSON.parse('{"docusaurusVersion":"2.4.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.0"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.4.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"2.4.0"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"2.4.0"}}}');var l={siteConfig:i.default,siteMetadata:c,globalData:r,i18n:o,codeTranslations:s},d=a.createContext(l);function u(e){var t=e.children;return a.createElement(d.Provider,{value:l},t)}},6293:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(3219),i=n(7378),r=n(161),o=n(7092),s=n(1721),c=n(432);function l(e){var t=e.error,n=e.tryAgain;return i.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},i.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),i.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),i.createElement(d,{error:t}))}function d(e){var t=e.error,n=(0,s.getErrorCausalChain)(t).map((function(e){return e.message})).join("\n\nCause:\n");return i.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function u(e){var t=e.error,n=e.tryAgain;return i.createElement(f,{fallback:function(){return i.createElement(l,{error:t,tryAgain:n})}},i.createElement(o.Z,null,i.createElement("title",null,"Page Error")),i.createElement(c.Z,null,i.createElement(l,{error:t,tryAgain:n})))}var p=function(e){return i.createElement(u,e)},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,a.Z)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){r.Z.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var a,i={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(a=this.props.fallback)?a:p)(i)}return null!=t?t:null},t}(i.Component)},161:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const i={canUseDOM:a,canUseEventListeners:a&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:a&&"IntersectionObserver"in window,canUseViewport:a&&"screen"in window}},7092:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(7378),i=n(2883);function r(e){return a.createElement(i.ql,e)}},6989:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r,s:()=>i});var a=n(7378);function i(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var a=null==t?void 0:t[e.slice(1,-1)];if(void 0!==a)return a}return e}));return n.some((function(e){return(0,a.isValidElement)(e)}))?n.map((function(e,t){return(0,a.isValidElement)(e)?a.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}function r(e){var t=e.children,n=e.values;if("string"!=typeof t)throw new Error("The Docusaurus component only accept simple string values. Received: "+((0,a.isValidElement)(t)?"React element":typeof t));return a.createElement(a.Fragment,null,i(t,n))}},1884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var a=n(5773),i=n(808),r=n(7378),o=n(4289),s=n(1721),c=n(353),l=n(5626),d=n(161),u=r.createContext({collectLink:function(){}});var p=n(8948),f=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h=e.isNavLink,v=e.to,b=e.href,g=e.activeClassName,y=e.isActive,w=e["data-noBrokenLinkCheck"],k=e.autoAddBaseUrl,_=void 0===k||k,x=(0,i.Z)(e,f),E=(0,c.Z)().siteConfig,S=E.trailingSlash,T=E.baseUrl,C=(0,p.C)().withBaseUrl,A=(0,r.useContext)(u),P=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return P.current}));var R=v||b;var I,O=(0,l.Z)(R),N=null==R?void 0:R.replace("pathname://",""),L=void 0!==N?(I=N,_&&function(e){return e.startsWith("/")}(I)?C(I):I):void 0;L&&O&&(L=(0,s.applyTrailingSlash)(L,{trailingSlash:S,baseUrl:T}));var z=(0,r.useRef)(!1),D=h?o.OL:o.rU,M=d.Z.canUseIntersectionObserver,F=(0,r.useRef)(),j=function(){z.current||null==L||(window.docusaurus.preload(L),z.current=!0)};(0,r.useEffect)((function(){return!M&&O&&null!=L&&window.docusaurus.prefetch(L),function(){M&&F.current&&F.current.disconnect()}}),[F,L,M,O]);var B=null!=(n=null==(m=L)?void 0:m.startsWith("#"))&&n,U=!L||!O||B;return U||w||A.collectLink(L),U?r.createElement("a",(0,a.Z)({ref:P,href:L},R&&!O&&{target:"_blank",rel:"noopener noreferrer"},x)):r.createElement(D,(0,a.Z)({},x,{onMouseEnter:j,onTouchStart:j,innerRef:function(e){P.current=e,M&&e&&O&&(F.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(F.current.unobserve(e),F.current.disconnect(),null!=L&&window.docusaurus.prefetch(L))}))})),F.current.observe(e))},to:L},h&&{isActive:y,activeClassName:g}))}const h=r.forwardRef(m)},7870:(e,t,n)=>{"use strict";n.d(t,{I:()=>s,Z:()=>c});var a=n(7378),i=n(6989),r=n(7529);function o(e){var t,n,a=e.id,i=e.message;if(void 0===a&&void 0===i)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=r[null!=a?a:i])?n:i)?t:a}function s(e,t){var n=o({message:e.message,id:e.id});return(0,i.s)(n,t)}function c(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var s=o({message:t,id:n});return a.createElement(a.Fragment,null,(0,i.s)(s,r))}},5688:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var a="default"},5626:(e,t,n)=>{"use strict";function a(e){return/^(?:\w*:|\/\/)/.test(e)}function i(e){return void 0!==e&&!a(e)}n.d(t,{Z:()=>i,b:()=>a})},8948:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,Z:()=>s});var a=n(7378),i=n(353),r=n(5626);function o(){var e=(0,i.Z)().siteConfig,t=e.baseUrl,n=e.url,o=(0,a.useCallback)((function(e,a){return function(e,t,n,a){var i=void 0===a?{}:a,o=i.forcePrependBaseUrl,s=void 0!==o&&o,c=i.absolute,l=void 0!==c&&c;if(!n||n.startsWith("#")||(0,r.b)(n))return n;if(s)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var d=n.startsWith(t)?n:t+n.replace(/^\//,"");return l?e+d:d}(n,t,e,a)}),[n,t]);return{withBaseUrl:o}}function s(e,t){return void 0===t&&(t={}),(0,o().withBaseUrl)(e,t)}},353:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(7378),i=n(3340);function r(){return(0,a.useContext)(i._)}},6457:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(7378),i=n(3427);function r(){return(0,a.useContext)(i._)}},3361:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});function a(e){var t={};return function e(n,a){Object.entries(n).forEach((function(n){var i,r=n[0],o=n[1],s=a?a+"."+r:r;"object"==typeof(i=o)&&i&&Object.keys(i).length>0?e(o,s):t[s]=o}))}(e),t}},6881:(e,t,n)=>{"use strict";n.d(t,{_:()=>i,z:()=>r});var a=n(7378),i=a.createContext(null);function r(e){var t=e.children,n=e.value,r=a.useContext(i),o=(0,a.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var a=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:a}}({parent:r,value:n})}),[r,n]);return a.createElement(i.Provider,{value:o},t)}},2935:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>b,gA:()=>f,WS:()=>m,_r:()=>u,Jo:()=>g,zh:()=>p,yW:()=>v,gB:()=>h});var a=n(3620),i=n(353),r=n(5688);function o(e,t){void 0===t&&(t={});var n=(0,i.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function c(e,t){var n=s(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,a.LX)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,i,r=c(e,t),o=null==r?void 0:r.docs.find((function(e){return!!(0,a.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:r,activeDoc:o,alternateDocVersions:o?(n=o.id,i={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(i[e.name]=t)}))})),i):{}}}var d={},u=function(){var e;return null!=(e=o("docusaurus-plugin-content-docs"))?e:d},p=function(e){return function(e,t,n){void 0===t&&(t=r.m),void 0===n&&(n={});var a=o(e),i=null==a?void 0:a[t];if(!i&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return i}("docusaurus-plugin-content-docs",e,{failfast:!0})};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var i=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,a.LX)(t,{path:n.path,exact:!1,strict:!1})})),r=i?{pluginId:i[0],pluginData:i[1]}:void 0;if(!r&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return r}(u(),(0,a.TH)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,a.TH)().pathname;if(t)return{activePlugin:t,activeVersion:c(t.pluginData,n)}}function h(e){return p(e).versions}function v(e){var t=p(e);return s(t)}function b(e){return l(p(e),(0,a.TH)().pathname)}function g(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,a.TH)().pathname)}},4374:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var a=n(8504),i=n.n(a);i().configure({showSpinner:!1});const r={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var a=window.setTimeout((function(){i().start()}),200);return function(){return window.clearTimeout(a)}}},onRouteDidUpdate:function(){i().done()}}},3815:(e,t,n)=>{"use strict";n.r(t);var a,i,r=n(2349),o=n(6809);a=r.Z,i=o.default.themeConfig.prism.additionalLanguages,globalThis.Prism=a,i.forEach((function(e){n(3392)("./prism-"+e)})),delete globalThis.Prism},6125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(7378);const i="iconExternalLink_nPrP";function r(e){var t=e.width,n=void 0===t?13.5:t,r=e.height,o=void 0===r?13.5:r;return a.createElement("svg",{width:n,height:o,"aria-hidden":"true",viewBox:"0 0 24 24",className:i},a.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},432:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Jt});var a=n(7378),i=n(8944),r=n(6293),o=n(1123),s=n(5773),c=n(3620),l=n(7870),d=n(4993),u="docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,a.useRef)(null),t=(0,c.k6)().action,n=(0,a.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(u);n&&p(n)}),[]);return(0,d.S)((function(n){var a=n.location;e.current&&!a.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,l.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,i=f(),r=i.containerRef,o=i.onClick;return a.createElement("div",{ref:r,role:"region","aria-label":m},a.createElement("a",(0,s.Z)({},e,{href:"#"+u,onClick:o}),n))}var v=n(5484),b=n(174);const g="skipToContent_oPtH";function y(){return a.createElement(h,{className:g})}var w=n(624),k=n(10),_=n(808),x=["width","height","color","strokeWidth","className"];function E(e){var t=e.width,n=void 0===t?21:t,i=e.height,r=void 0===i?21:i,o=e.color,c=void 0===o?"currentColor":o,l=e.strokeWidth,d=void 0===l?1.2:l,u=(e.className,(0,_.Z)(e,x));return a.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:n,height:r},u),a.createElement("g",{stroke:c,strokeWidth:d},a.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S="closeButton_J5rP";function T(e){return a.createElement("button",(0,s.Z)({type:"button","aria-label":(0,l.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,i.Z)("clean-btn close",S,e.className)}),a.createElement(E,{width:14,height:14,strokeWidth:3.1}))}const C="content_bSb_";function A(e){var t=(0,w.L)().announcementBar.content;return a.createElement("div",(0,s.Z)({},e,{className:(0,i.Z)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}const P="announcementBar_zJRd",R="announcementBarPlaceholder_NpUd",I="announcementBarClose_Jjdj",O="announcementBarContent_t7IR";function N(){var e=(0,w.L)().announcementBar,t=(0,k.nT)(),n=t.isActive,i=t.close;if(!n)return null;var r=e.backgroundColor,o=e.textColor,s=e.isCloseable;return a.createElement("div",{className:P,style:{backgroundColor:r,color:o},role:"banner"},s&&a.createElement("div",{className:R}),a.createElement(A,{className:O}),s&&a.createElement(T,{onClick:i,className:I}))}var L=n(5536),z=n(3457);var D=n(8215),M=n(3471),F=a.createContext(null);function j(e){var t,n,i,r,o,s,c,l=e.children,d=(t=(0,L.e)(),n=(0,M.HY)(),i=(0,a.useState)(!1),r=i[0],o=i[1],s=null!==n.component,c=(0,D.D9)(s),(0,a.useEffect)((function(){s&&!c&&o(!0)}),[s,c]),(0,a.useEffect)((function(){s?t.shown||o(!0):o(!1)}),[t.shown,s]),(0,a.useMemo)((function(){return[r,o]}),[r]));return a.createElement(F.Provider,{value:d},l)}function B(e){if(e.component){var t=e.component;return a.createElement(t,e.props)}}function U(){var e=(0,a.useContext)(F);if(!e)throw new D.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],i=(0,a.useCallback)((function(){return n(!1)}),[n]),r=(0,M.HY)();return(0,a.useMemo)((function(){return{shown:t,hide:i,content:B(r)}}),[i,r,t])}function q(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=U().shown;return a.createElement("div",{className:"navbar-sidebar"},t,a.createElement("div",{className:(0,i.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o})},a.createElement("div",{className:"navbar-sidebar__item menu"},n),a.createElement("div",{className:"navbar-sidebar__item menu"},r)))}var Z=n(5421),G=n(6457);function $(e){return a.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),a.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function H(e){return a.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),a.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const V={toggle:"toggle_ki11",toggleButton:"toggleButton_MMFG",darkToggleIcon:"darkToggleIcon_U96C",lightToggleIcon:"lightToggleIcon_lgto",toggleButtonDisabled:"toggleButtonDisabled_Uw7m"};function W(e){var t=e.className,n=e.buttonClassName,r=e.value,o=e.onChange,s=(0,G.Z)(),c=(0,l.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return a.createElement("div",{className:(0,i.Z)(V.toggle,t)},a.createElement("button",{className:(0,i.Z)("clean-btn",V.toggleButton,!s&&V.toggleButtonDisabled,n),type:"button",onClick:function(){return o("dark"===r?"light":"dark")},disabled:!s,title:c,"aria-label":c,"aria-live":"polite"},a.createElement($,{className:(0,i.Z)(V.toggleIcon,V.lightToggleIcon)}),a.createElement(H,{className:(0,i.Z)(V.toggleIcon,V.darkToggleIcon)})))}const K=a.memo(W),Q="darkNavbarColorModeToggle_m8pZ";function Y(e){var t=e.className,n=(0,w.L)().navbar.style,i=(0,w.L)().colorMode.disableSwitch,r=(0,Z.I)(),o=r.colorMode,s=r.setColorMode;return i?null:a.createElement(K,{className:t,buttonClassName:"dark"===n?Q:void 0,value:o,onChange:s})}var X=n(898);function J(){return a.createElement(X.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function ee(){var e=(0,L.e)();return a.createElement("button",{type:"button","aria-label":(0,l.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},a.createElement(E,{color:"var(--ifm-color-emphasis-600)"}))}function te(){return a.createElement("div",{className:"navbar-sidebar__brand"},a.createElement(J,null),a.createElement(Y,{className:"margin-right--md"}),a.createElement(ee,null))}var ne=n(1884),ae=n(8948),ie=n(5626),re=n(1503),oe=n(6125),se=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ce(e){var t=e.activeBasePath,n=e.activeBaseRegex,i=e.to,r=e.href,o=e.label,c=e.html,l=e.isDropdownLink,d=e.prependBaseUrlToHref,u=(0,_.Z)(e,se),p=(0,ae.Z)(i),f=(0,ae.Z)(t),m=(0,ae.Z)(r,{forcePrependBaseUrl:!0}),h=o&&r&&!(0,ie.Z)(r),v=c?{dangerouslySetInnerHTML:{__html:c}}:{children:a.createElement(a.Fragment,null,o,h&&a.createElement(oe.Z,l&&{width:12,height:12}))};return r?a.createElement(ne.Z,(0,s.Z)({href:d?m:r},u,v)):a.createElement(ne.Z,(0,s.Z)({to:p,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,re.F)(n,t.pathname):t.pathname.startsWith(f)}},u,v))}var le=["className","isDropdownItem"],de=["className","isDropdownItem"],ue=["mobile","position"];function pe(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,_.Z)(e,le),c=a.createElement(ce,(0,s.Z)({className:(0,i.Z)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?a.createElement("li",null,c):c}function fe(e){var t=e.className,n=(e.isDropdownItem,(0,_.Z)(e,de));return a.createElement("li",{className:"menu__list-item"},a.createElement(ce,(0,s.Z)({className:(0,i.Z)("menu__link",t)},n)))}function me(e){var t,n=e.mobile,i=void 0!==n&&n,r=(e.position,(0,_.Z)(e,ue)),o=i?fe:pe;return a.createElement(o,(0,s.Z)({},r,{activeClassName:null!=(t=r.activeClassName)?t:i?"menu__link--active":"navbar__link--active"}))}var he=n(376),ve=n(8862),be=n(353);var ge=["items","position","className","onClick"],ye=["items","className","position","onClick"],we=["mobile"];function ke(e,t){return e.some((function(e){return function(e,t){return!!(0,ve.Mg)(e.to,t)||!!(0,re.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function _e(e){var t,n=e.items,r=e.position,o=e.className,c=(e.onClick,(0,_.Z)(e,ge)),l=(0,a.useRef)(null),d=(0,a.useState)(!1),u=d[0],p=d[1];return(0,a.useEffect)((function(){var e=function(e){l.current&&!l.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),a.createElement("div",{ref:l,className:(0,i.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===r,"dropdown--show":u})},a.createElement(ce,(0,s.Z)({"aria-haspopup":"true","aria-expanded":u,role:"button",href:c.to?void 0:"#",className:(0,i.Z)("navbar__link",o)},c,{onClick:c.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!u))}}),null!=(t=c.children)?t:c.label),a.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return a.createElement(lt,(0,s.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function xe(e){var t,n,r=e.items,o=e.className,l=(e.position,e.onClick),d=(0,_.Z)(e,ye),u=(n=(0,be.Z)().siteConfig.baseUrl,(0,c.TH)().pathname.replace(n,"/")),p=ke(r,u),f=(0,he.u)({initialState:function(){return!p}}),m=f.collapsed,h=f.toggleCollapsed,v=f.setCollapsed;return(0,a.useEffect)((function(){p&&v(!p)}),[u,p,v]),a.createElement("li",{className:(0,i.Z)("menu__list-item",{"menu__list-item--collapsed":m})},a.createElement(ce,(0,s.Z)({role:"button",className:(0,i.Z)("menu__link menu__link--sublist menu__link--sublist-caret",o)},d,{onClick:function(e){e.preventDefault(),h()}}),null!=(t=d.children)?t:d.label),a.createElement(he.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},r.map((function(e,t){return a.createElement(lt,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:l,activeClassName:"menu__link--active"},e,{key:t}))}))))}function Ee(e){var t=e.mobile,n=void 0!==t&&t,i=(0,_.Z)(e,we),r=n?xe:_e;return a.createElement(r,i)}var Se=n(3714),Te=["width","height"];function Ce(e){var t=e.width,n=void 0===t?20:t,i=e.height,r=void 0===i?20:i,o=(0,_.Z)(e,Te);return a.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:n,height:r,"aria-hidden":!0},o),a.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const Ae="iconLanguage_kvP7";var Pe=["mobile","dropdownItemsBefore","dropdownItemsAfter"];function Re(){return a.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},a.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var Ie=n(6573),Oe=["translations"];function Ne(){return Ne=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Me="Ctrl";var Fe=a.forwardRef((function(e,t){var n=e.translations,i=void 0===n?{}:n,r=De(e,Oe),o=i.buttonText,s=void 0===o?"Search":o,c=i.buttonAriaLabel,l=void 0===c?"Search":c,d=Le((0,a.useState)(null),2),u=d[0],p=d[1];return(0,a.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(Me))}),[]),a.createElement("button",Ne({type:"button",className:"DocSearch DocSearch-Button","aria-label":l},r,{ref:t}),a.createElement("span",{className:"DocSearch-Button-Container"},a.createElement(Ie.W,null),a.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),a.createElement("span",{className:"DocSearch-Button-Keys"},null!==u&&a.createElement(a.Fragment,null,a.createElement("kbd",{className:"DocSearch-Button-Key"},u===Me?a.createElement(Re,null):u),a.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),je=n(7092),Be=n(3584),Ue=n(2473),qe=n(3149);var Ze=n(1542);const Ge={button:{buttonText:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};var $e=["contextualSearch","externalUrlRegex"],He=null;function Ve(e){var t=e.hit,n=e.children;return a.createElement(ne.Z,{to:t.url},n)}function We(e){var t=e.state,n=e.onClose,i=(0,Be.M)();return a.createElement(ne.Z,{to:i(t.query),onClick:n},a.createElement(l.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function Ke(e){var t,i,r,o,l,d=e.contextualSearch,u=e.externalUrlRegex,p=(0,_.Z)(e,$e),f=(0,be.Z)().siteMetadata,m=(0,Ue.l)(),h=["language:"+(r=(0,qe._q)()).locale,r.tags.map((function(e){return"docusaurus_tag:"+e}))],v=null!=(t=null==(i=p.searchParameters)?void 0:i.facetFilters)?t:[],b=d?(o=v,[].concat((l=function(e){return"string"==typeof e?[e]:e})(h),l(o))):v,g=Object.assign({},p.searchParameters,{facetFilters:b}),y=(0,c.k6)(),w=(0,a.useRef)(null),k=(0,a.useRef)(null),x=(0,a.useState)(!1),E=x[0],S=x[1],T=(0,a.useState)(void 0),C=T[0],A=T[1],P=(0,a.useCallback)((function(){return He?Promise.resolve():Promise.all([n.e(8777).then(n.bind(n,8777)),Promise.all([n.e(532),n.e(9127)]).then(n.bind(n,9127)),Promise.all([n.e(532),n.e(4670)]).then(n.bind(n,4670))]).then((function(e){var t=e[0].DocSearchModal;He=t}))}),[]),R=(0,a.useCallback)((function(){P().then((function(){w.current=document.createElement("div"),document.body.insertBefore(w.current,document.body.firstChild),S(!0)}))}),[P,S]),I=(0,a.useCallback)((function(){var e;S(!1),null==(e=w.current)||e.remove()}),[S]),O=(0,a.useCallback)((function(e){P().then((function(){S(!0),A(e.key)}))}),[P,S,A]),N=(0,a.useRef)({navigate:function(e){var t=e.itemUrl;(0,re.F)(u,t)?window.location.href=t:y.push(t)}}).current,L=(0,a.useRef)((function(e){return p.transformItems?p.transformItems(e):e.map((function(e){return Object.assign({},e,{url:m(e.url)})}))})).current,z=(0,a.useMemo)((function(){return function(e){return a.createElement(We,(0,s.Z)({},e,{onClose:I}))}}),[I]),D=(0,a.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",f.docusaurusVersion),e}),[f.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,i=e.onClose,r=e.onInput,o=e.searchButtonRef;a.useEffect((function(){function e(e){(27===e.keyCode&&t||"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?i():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),o&&o.current===document.activeElement&&r&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&r(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,i,r,o])}({isOpen:E,onOpen:R,onClose:I,onInput:O,searchButtonRef:k}),a.createElement(a.Fragment,null,a.createElement(je.Z,null,a.createElement("link",{rel:"preconnect",href:"https://"+p.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})),a.createElement(Fe,{onTouchStart:P,onFocus:P,onMouseOver:P,onClick:R,ref:k,translations:Ge.button}),E&&He&&w.current&&(0,Ze.createPortal)(a.createElement(He,(0,s.Z)({onClose:I,initialScrollY:window.scrollY,initialQuery:C,navigator:N,transformItems:L,hitComponent:Ve,transformSearchClient:D},p.searchPagePath&&{resultsFooterComponent:z},p,{searchParameters:g,placeholder:Ge.placeholder,translations:Ge.modal})),w.current))}function Qe(){var e=(0,be.Z)().siteConfig;return a.createElement(Ke,e.themeConfig.algolia)}const Ye="searchBox_WqAV";function Xe(e){var t=e.children,n=e.className;return a.createElement("div",{className:(0,i.Z)(n,Ye)},t)}var Je=n(2935),et=n(2949),tt=["docId","label","docsPluginId"];var nt=["sidebarId","label","docsPluginId"];var at=["label","to","docsPluginId"];var it=n(4453),rt=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],ot=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};const st={default:me,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,i=e.dropdownItemsAfter,r=(0,_.Z)(e,Pe),o=(0,be.Z)().i18n,d=o.currentLocale,u=o.locales,p=o.localeConfigs,f=(0,Se.l)(),m=(0,c.TH)(),h=m.search,v=m.hash,b=u.map((function(e){var n=""+("pathname://"+f.createUrl({locale:e,fullyQualified:!1}))+h+v;return{label:p[e].label,lang:p[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===d?t?"menu__link--active":"dropdown__link--active":""}})),g=[].concat(n,b,i),y=t?(0,l.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):p[d].label;return a.createElement(Ee,(0,s.Z)({},r,{mobile:t,label:a.createElement(a.Fragment,null,a.createElement(Ce,{className:Ae}),y),items:g}))},search:function(e){var t=e.mobile,n=e.className;return t?null:a.createElement(Xe,{className:n},a.createElement(Qe,null))},dropdown:Ee,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,s=e.isDropdownItem,c=void 0!==s&&s,l=c?"li":"div";return a.createElement(l,{className:(0,i.Z)({navbar__item:!o&&!c,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,i=e.docsPluginId,r=(0,_.Z)(e,tt),o=(0,Je.Iw)(i).activeDoc,c=(0,et.vY)(t,i);return null===c?null:a.createElement(me,(0,s.Z)({exact:!0},r,{isActive:function(){return(null==o?void 0:o.path)===c.path||!(null==o||!o.sidebar)&&o.sidebar===c.sidebar},label:null!=n?n:c.id,to:c.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,i=e.docsPluginId,r=(0,_.Z)(e,nt),o=(0,Je.Iw)(i).activeDoc,c=(0,et.oz)(t,i).link;if(!c)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return a.createElement(me,(0,s.Z)({exact:!0},r,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:c.label,to:c.path}))},docsVersion:function(e){var t=e.label,n=e.to,i=e.docsPluginId,r=(0,_.Z)(e,at),o=(0,et.lO)(i)[0],c=null!=t?t:o.label,l=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(o).path;return a.createElement(me,(0,s.Z)({},r,{label:c,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,i=e.dropdownActiveClassDisabled,r=e.dropdownItemsBefore,o=e.dropdownItemsAfter,d=(0,_.Z)(e,rt),u=(0,c.TH)(),p=u.search,f=u.hash,m=(0,Je.Iw)(n),h=(0,Je.gB)(n),v=(0,it.J)(n).savePreferredVersionName,b=h.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:ot(e);return{label:e.label,to:""+n.path+p+f,isActive:function(){return e===m.activeVersion},onClick:function(){return v(e.name)}}})),g=[].concat(r,b,o),y=(0,et.lO)(n)[0],w=t&&g.length>1?(0,l.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,k=t&&g.length>1?void 0:ot(y).path;return g.length<=1?a.createElement(me,(0,s.Z)({},d,{mobile:t,label:w,to:k,isActive:i?function(){return!1}:void 0})):a.createElement(Ee,(0,s.Z)({},d,{mobile:t,label:w,to:k,items:g,isActive:i?function(){return!1}:void 0}))}};var ct=["type"];function lt(e){var t=e.type,n=(0,_.Z)(e,ct),i=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),r=st[i];if(!r)throw new Error('No NavbarItem component found for type "'+t+'".');return a.createElement(r,n)}function dt(){var e=(0,L.e)(),t=(0,w.L)().navbar.items;return a.createElement("ul",{className:"menu__list"},t.map((function(t,n){return a.createElement(lt,(0,s.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function ut(e){return a.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),a.createElement(l.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function pt(){var e=0===(0,w.L)().navbar.items.length,t=U();return a.createElement(a.Fragment,null,!e&&a.createElement(ut,{onClick:function(){return t.hide()}}),t.content)}function ft(){var e,t=(0,L.e)();return void 0===(e=t.shown)&&(e=!0),(0,a.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?a.createElement(q,{header:a.createElement(te,null),primaryMenu:a.createElement(dt,null),secondaryMenu:a.createElement(pt,null)}):null}const mt="navbarHideable_hhpl",ht="navbarHidden_nmcs";function vt(e){return a.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,i.Z)("navbar-sidebar__backdrop",e.className)}))}function bt(e){var t=e.children,n=(0,w.L)().navbar,r=n.hideOnScroll,o=n.style,s=(0,L.e)(),c=function(e){var t=(0,a.useState)(e),n=t[0],i=t[1],r=(0,a.useRef)(!1),o=(0,a.useRef)(0),s=(0,a.useCallback)((function(e){null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,z.RF)((function(t,n){var a=t.scrollY;if(e)if(a=s?i(!1):a+l0&&a.createElement(Bt,{links:n}),logo:i&&a.createElement(Gt,{logo:i}),copyright:t&&a.createElement($t,{copyright:t})})}const Wt=a.memo(Vt);var Kt=(0,D.Qc)([Z.S,k.pl,z.OC,it.L5,o.VC,function(e){var t=e.children;return a.createElement(M.n2,null,a.createElement(L.M,null,a.createElement(j,null,t)))}]);function Qt(e){var t=e.children;return a.createElement(Kt,null,t)}function Yt(e){var t=e.error,n=e.tryAgain;return a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),a.createElement("div",{className:"margin-vert--lg"},a.createElement(kt,{onClick:n,className:"button button--primary shadow--lw"})),a.createElement("hr",null),a.createElement("div",{className:"margin-vert--md"},a.createElement(_t,{error:t})))))}const Xt="mainWrapper_MB5r";function Jt(e){var t=e.children,n=e.noFooter,s=e.wrapperClassName,c=e.title,l=e.description;return(0,b.t)(),a.createElement(Qt,null,a.createElement(o.d,{title:c,description:l}),a.createElement(y,null),a.createElement(N,null),a.createElement(It,null),a.createElement("div",{id:u,className:(0,i.Z)(v.k.wrapper.main,Xt,s)},a.createElement(r.Z,{fallback:function(e){return a.createElement(Yt,e)}},t)),!n&&a.createElement(Wt,null))}},898:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(5773),i=n(808),r=n(7378),o=n(1884),s=n(8948),c=n(353),l=n(624),d=n(4034),u=["imageClassName","titleClassName"];function p(e){var t=e.logo,n=e.alt,a=e.imageClassName,i={light:(0,s.Z)(t.src),dark:(0,s.Z)(t.srcDark||t.src)},o=r.createElement(d.Z,{className:t.className,sources:i,height:t.height,width:t.width,alt:n,style:t.style});return a?r.createElement("div",{className:a},o):o}function f(e){var t,n=(0,c.Z)().siteConfig.title,d=(0,l.L)().navbar,f=d.title,m=d.logo,h=e.imageClassName,v=e.titleClassName,b=(0,i.Z)(e,u),g=(0,s.Z)((null==m?void 0:m.href)||"/"),y=f?"":n,w=null!=(t=null==m?void 0:m.alt)?t:y;return r.createElement(o.Z,(0,a.Z)({to:g},b,(null==m?void 0:m.target)&&{target:m.target}),m&&r.createElement(p,{logo:m,alt:w,imageClassName:h}),null!=f&&r.createElement("b",{className:v},f))}},505:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(7378),i=n(7092);function r(e){var t=e.locale,n=e.version,r=e.tag,o=t;return a.createElement(i.Z,null,t&&a.createElement("meta",{name:"docusaurus_locale",content:t}),n&&a.createElement("meta",{name:"docusaurus_version",content:n}),r&&a.createElement("meta",{name:"docusaurus_tag",content:r}),o&&a.createElement("meta",{name:"docsearch:language",content:o}),n&&a.createElement("meta",{name:"docsearch:version",content:n}),r&&a.createElement("meta",{name:"docsearch:docusaurus_tag",content:r}))}},4034:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(5773),i=n(808),r=n(7378),o=n(8944),s=n(6457),c=n(5421);const l={themedImage:"themedImage_BQGR","themedImage--light":"themedImage--light_HAxW","themedImage--dark":"themedImage--dark_bGx0"};var d=["sources","className","alt"];function u(e){var t=(0,s.Z)(),n=(0,c.I)().colorMode,u=e.sources,p=e.className,f=e.alt,m=(0,i.Z)(e,d),h=t?"dark"===n?["dark"]:["light"]:["light","dark"];return r.createElement(r.Fragment,null,h.map((function(e){return r.createElement("img",(0,a.Z)({key:e,src:u[e],alt:f,className:(0,o.Z)(l.themedImage,l["themedImage--"+e],p)},m))})))}},376:(e,t,n)=>{"use strict";n.d(t,{u:()=>l,z:()=>g});var a=n(5773),i=n(808),r=n(7378),o=n(161),s=["collapsed"],c=["lazy"];function l(e){var t=e.initialState,n=(0,r.useState)(null!=t&&t),a=n[0],i=n[1],o=(0,r.useCallback)((function(){i((function(e){return!e}))}),[]);return{collapsed:a,setCollapsed:i,toggleCollapsed:o}}var d={display:"none",overflow:"hidden",height:"0px"},u={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?d:u;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}function m(e){var t=e.collapsibleRef,n=e.collapsed,a=e.animation,i=(0,r.useRef)(!1);(0,r.useEffect)((function(){var e,r=t.current;function o(){var e,t,n,i=(n=r.scrollHeight,{transition:"height "+(null!=(e=null==a?void 0:a.duration)?e:f(n))+"ms "+(null!=(t=null==a?void 0:a.easing)?t:"ease-in-out"),height:n+"px"});r.style.transition=i.transition,r.style.height=i.height}if(!i.current)return p(r,n),void(i.current=!0);return r.style.willChange="height",e=requestAnimationFrame((function(){n?(o(),requestAnimationFrame((function(){r.style.height=d.height,r.style.overflow=d.overflow}))):(r.style.display="block",requestAnimationFrame((function(){o()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,a])}function h(e){if(!o.Z.canUseDOM)return e?d:u}function v(e){var t=e.as,n=void 0===t?"div":t,a=e.collapsed,i=e.children,o=e.animation,s=e.onCollapseTransitionEnd,c=e.className,l=e.disableSSRStyle,d=(0,r.useRef)(null);return m({collapsibleRef:d,collapsed:a,animation:o}),r.createElement(n,{ref:d,style:l?void 0:h(a),onTransitionEnd:function(e){"height"===e.propertyName&&(p(d.current,a),null==s||s(a))},className:c},i)}function b(e){var t=e.collapsed,n=(0,i.Z)(e,s),o=(0,r.useState)(!t),c=o[0],l=o[1],d=(0,r.useState)(t),u=d[0],p=d[1];return(0,r.useLayoutEffect)((function(){t||l(!0)}),[t]),(0,r.useLayoutEffect)((function(){c&&p(t)}),[c,t]),c?r.createElement(v,(0,a.Z)({},n,{collapsed:u})):null}function g(e){var t=e.lazy,n=(0,i.Z)(e,c),a=t?b:v;return r.createElement(a,n)}},10:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>f});var a=n(7378),i=n(6457),r=n(1819),o=n(8215),s=n(624),c=(0,r.WA)("docusaurus.announcement.dismiss"),l=(0,r.WA)("docusaurus.announcement.id"),d=function(){return"true"===c.get()},u=function(e){return c.set(String(e))},p=a.createContext(null);function f(e){var t=e.children,n=function(){var e=(0,s.L)().announcementBar,t=(0,i.Z)(),n=(0,a.useState)((function(){return!!t&&d()})),r=n[0],o=n[1];(0,a.useEffect)((function(){o(d())}),[]);var c=(0,a.useCallback)((function(){u(!0),o(!0)}),[]);return(0,a.useEffect)((function(){if(e){var t=e.id,n=l.get();"annoucement-bar"===n&&(n="announcement-bar");var a=t!==n;l.set(t),a&&u(!1),!a&&d()||o(!1)}}),[e]),(0,a.useMemo)((function(){return{isActive:!!e&&!r,close:c}}),[e,r,c])}();return a.createElement(p.Provider,{value:n},t)}function m(){var e=(0,a.useContext)(p);if(!e)throw new o.i6("AnnouncementBarProvider");return e}},5421:(e,t,n)=>{"use strict";n.d(t,{I:()=>v,S:()=>h});var a=n(7378),i=n(161),r=n(8215),o=n(1819),s=n(624),c=a.createContext(void 0),l="theme",d=(0,o.WA)(l),u="light",p="dark",f=function(e){return e===p?p:u};function m(){var e=(0,s.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,r=e.respectPrefersColorScheme,o=(0,a.useState)(function(e){return i.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)}(t)),c=o[0],m=o[1];(0,a.useEffect)((function(){n&&d.del()}),[n]);var h=(0,a.useCallback)((function(e,n){void 0===n&&(n={});var a=n.persist,i=void 0===a||a;e?(m(e),i&&function(e){d.set(f(e))}(e)):(m(r?window.matchMedia("(prefers-color-scheme: dark)").matches?p:u:t),d.del())}),[r,t]);(0,a.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(c))}),[c]),(0,a.useEffect)((function(){if(!n){var e=function(e){if(e.key===l){var t=d.get();null!==t&&h(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,h]);var v=(0,a.useRef)(!1);return(0,a.useEffect)((function(){if(!n||r){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||v.current?v.current=window.matchMedia("print").matches:h(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[h,n,r]),(0,a.useMemo)((function(){return{colorMode:c,setColorMode:h,get isDarkTheme(){return c===p},setLightTheme:function(){h(u)},setDarkTheme:function(){h(p)}}}),[c,h])}function h(e){var t=e.children,n=m();return a.createElement(c.Provider,{value:n},t)}function v(){var e=(0,a.useContext)(c);if(null==e)throw new r.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},4453:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>b,Oh:()=>w});var a=n(7378),i=n(2935),r=n(5688),o=n(624),s=n(2949),c=n(8215),l=n(1819),d=function(e){return"docs-preferred-version-"+e},u=function(e,t,n){(0,l.WA)(d(e),{persistence:t}).set(n)},p=function(e,t){return(0,l.WA)(d(e),{persistence:t}).get()},f=function(e,t){(0,l.WA)(d(e),{persistence:t}).del()};var m=a.createContext(null);function h(){var e=(0,i._r)(),t=(0,o.L)().docs.versionPersistence,n=(0,a.useMemo)((function(){return Object.keys(e)}),[e]),r=(0,a.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),s=r[0],c=r[1];return(0,a.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,a=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,i=p(t,n),a[t].versions.some((function(e){return e.name===i}))?{preferredVersionName:i}:(f(t,n),{preferredVersionName:null}))];var t,i})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,a.useMemo)((function(){return{savePreferredVersion:function(e,n){u(e,t,n),c((function(t){var a;return Object.assign({},t,((a={})[e]={preferredVersionName:n},a))}))}}}),[t])]}function v(e){var t=e.children,n=h();return a.createElement(m.Provider,{value:n},t)}function b(e){var t=e.children;return s.cE?a.createElement(v,null,t):a.createElement(a.Fragment,null,t)}function g(){var e=(0,a.useContext)(m);if(!e)throw new c.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=r.m);var n=(0,i.zh)(e),o=g(),s=o[0],c=o[1],l=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===l})))?t:null,savePreferredVersionName:(0,a.useCallback)((function(t){c.savePreferredVersion(e,t)}),[c,e])}}function w(){var e=(0,i._r)(),t=g()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(a=n,r=e[a],o=t[a].preferredVersionName,null!=(i=r.versions.find((function(e){return e.name===o})))?i:null)];var a,i,r,o})))}},2095:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,b:()=>s});var a=n(7378),i=n(8215),r=Symbol("EmptyContext"),o=a.createContext(r);function s(e){var t=e.children,n=e.name,i=e.items,r=(0,a.useMemo)((function(){return n&&i?{name:n,items:i}:null}),[n,i]);return a.createElement(o.Provider,{value:r},t)}function c(){var e=(0,a.useContext)(o);if(e===r)throw new i.i6("DocsSidebarProvider");return e}},5611:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>o});var a=n(7378),i=n(8215),r=a.createContext(null);function o(e){var t=e.children,n=e.version;return a.createElement(r.Provider,{value:n},t)}function s(){var e=(0,a.useContext)(r);if(null===e)throw new i.i6("DocsVersionProvider");return e}},5536:(e,t,n)=>{"use strict";n.d(t,{M:()=>u,e:()=>p});var a=n(7378),i=n(3471),r=n(8357),o=n(654),s=n(624),c=n(8215),l=a.createContext(void 0);function d(){var e,t=(e=(0,i.HY)(),0===(0,s.L)().navbar.items.length&&!e.component),n=(0,r.i)(),c=!t&&"mobile"===n,l=(0,a.useState)(!1),d=l[0],u=l[1];(0,o.Rb)((function(){if(d)return u(!1),!1}));var p=(0,a.useCallback)((function(){u((function(e){return!e}))}),[]);return(0,a.useEffect)((function(){"desktop"===n&&u(!1)}),[n]),(0,a.useMemo)((function(){return{disabled:t,shouldRender:c,toggle:p,shown:d}}),[t,c,p,d])}function u(e){var t=e.children,n=d();return a.createElement(l.Provider,{value:n},t)}function p(){var e=a.useContext(l);if(void 0===e)throw new c.i6("NavbarMobileSidebarProvider");return e}},3471:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>c,n2:()=>o});var a=n(7378),i=n(8215),r=a.createContext(null);function o(e){var t=e.children,n=(0,a.useState)({component:null,props:null});return a.createElement(r.Provider,{value:n},t)}function s(){var e=(0,a.useContext)(r);if(!e)throw new i.i6("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){var t=e.component,n=e.props,o=(0,a.useContext)(r);if(!o)throw new i.i6("NavbarSecondaryMenuContentProvider");var s=o[1],c=(0,i.Ql)(n);return(0,a.useEffect)((function(){s({component:t,props:c})}),[s,t,c]),(0,a.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},174:(e,t,n)=>{"use strict";n.d(t,{h:()=>i,t:()=>r});var a=n(7378),i="navigation-with-keyboard";function r(){(0,a.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(i),"mousedown"===e.type&&document.body.classList.remove(i)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(i),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},3584:(e,t,n)=>{"use strict";n.d(t,{K:()=>o,M:()=>s});var a=n(7378),i=n(353),r=n(654);function o(){return(0,r.Nc)("q")}function s(){var e=(0,i.Z)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,a.useCallback)((function(e){return""+t+n+"?q="+encodeURIComponent(e)}),[t,n])}},8357:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var a=n(7378),i=n(161),r="desktop",o="mobile",s="ssr";function c(){return i.Z.canUseDOM?window.innerWidth>996?r:o:s}function l(){var e=(0,a.useState)((function(){return c()})),t=e[0],n=e[1];return(0,a.useEffect)((function(){function e(){n(c())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5484:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var a={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},2949:(e,t,n)=>{"use strict";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{MN:()=>T,Wl:()=>v,_F:()=>y,cE:()=>m,jA:()=>b,xz:()=>h,hI:()=>S,lO:()=>_,vY:()=>E,oz:()=>x,s1:()=>k});var r=n(7378),o=n(3620),s=n(5473),c=n(2935),l=n(4453),d=n(5611),u=n(2095),p=n(784),f=n(8862),m=!!c._r;function h(e){var t=(0,d.E)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function v(e){if(e.href)return e.href;for(var t,n=i(e.items);!(t=n()).done;){var a=t.value;if("link"===a.type)return a.href;if("category"===a.type){var r=v(a);if(r)return r}}}function b(){var e=(0,o.TH)().pathname,t=(0,u.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var g=function(e,t){return void 0!==e&&(0,f.Mg)(e,t)};function y(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||function(e,t){return e.some((function(e){return y(e,t)}))}(e.items,t))}function w(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,r=void 0!==a&&a,o=[];return function e(t){for(var a,s=i(t);!(a=s()).done;){var c=a.value;if("category"===c.type&&((0,f.Mg)(c.href,n)||e(c.items))||"link"===c.type&&(0,f.Mg)(c.href,n))return r&&"category"!==c.type||o.unshift(c),!0}return!1}(t),o}function k(){var e,t=(0,u.V)(),n=(0,o.TH)().pathname;return!1!==(null==(e=(0,c.gA)())?void 0:e.pluginData.breadcrumbs)&&t?w({sidebarItems:t.items,pathname:n}):null}function _(e){var t=(0,c.Iw)(e).activeVersion,n=(0,l.J)(e).preferredVersion,a=(0,c.yW)(e);return(0,r.useMemo)((function(){return(0,p.j)([t,n,a].filter(Boolean))}),[t,n,a])}function x(e,t){var n=_(t);return(0,r.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),a=t.find((function(t){return t[0]===e}));if(!a)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+Object.keys(t).join("\n- "));return a[1]}),[e,n])}function E(e,t){var n=_(t);return(0,r.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),a=t.find((function(t){return t.id===e}));if(!a){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,p.j)(t.map((function(e){return e.id}))).join("\n- "))}return a}),[e,n])}function S(e){var t=e.route,n=e.versionMetadata,a=(0,o.TH)(),i=t.routes,r=i.find((function(e){return(0,o.LX)(a.pathname,e)}));if(!r)return null;var c=r.sidebar,l=c?n.docsSidebars[c]:void 0;return{docElement:(0,s.H)(i),sidebarName:c,sidebarItems:l}}function T(e){return e.filter((function(e){return"category"!==e.type||!!v(e)}))}},9162:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});var a=n(353);function i(e){var t=(0,a.Z)().siteConfig,n=t.title,i=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+i+" "+n:n}},654:(e,t,n)=>{"use strict";n.d(t,{Nc:()=>l,Rb:()=>s,_X:()=>c});var a=n(7378),i=n(3620),r=n(644),o=n(8215);function s(e){!function(e){var t=(0,i.k6)(),n=(0,o.zX)(e);(0,a.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function c(e){return t=function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)},n=(0,i.k6)(),(0,r.useSyncExternalStore)(n.listen,(function(){return t(n)}),(function(){return t(n)}));var t,n}function l(e){var t,n,r=null!=(t=c(e))?t:"",o=(n=(0,i.k6)(),(0,a.useCallback)((function(e,t,a){var i=new URLSearchParams(n.location.search);t?i.set(e,t):i.delete(e),(null!=a&&a.push?n.push:n.replace)({search:i.toString()})}),[n]));return[r,(0,a.useCallback)((function(t,n){o(e,t,n)}),[o,e])]}},784:(e,t,n)=>{"use strict";function a(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,a){return e.findIndex((function(e){return t(e,n)}))!==a}))}function i(e){return Array.from(new Set(e))}n.d(t,{j:()=>i,l:()=>a})},1123:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,d:()=>d,VC:()=>f});var a=n(7378),i=n(8944),r=n(7092),o=n(6881);function s(){var e=a.useContext(o._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(8948),l=n(9162);function d(e){var t=e.title,n=e.description,i=e.keywords,o=e.image,s=e.children,d=(0,l.p)(t),u=(0,c.C)().withBaseUrl,p=o?u(o,{absolute:!0}):void 0;return a.createElement(r.Z,null,t&&a.createElement("title",null,d),t&&a.createElement("meta",{property:"og:title",content:d}),n&&a.createElement("meta",{name:"description",content:n}),n&&a.createElement("meta",{property:"og:description",content:n}),i&&a.createElement("meta",{name:"keywords",content:Array.isArray(i)?i.join(","):i}),p&&a.createElement("meta",{property:"og:image",content:p}),p&&a.createElement("meta",{name:"twitter:image",content:p}),s)}var u=a.createContext(void 0);function p(e){var t=e.className,n=e.children,o=a.useContext(u),s=(0,i.Z)(o,t);return a.createElement(u.Provider,{value:s},a.createElement(r.Z,null,a.createElement("html",{className:s})),n)}function f(e){var t=e.children,n=s(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return a.createElement(p,{className:(0,i.Z)(r,o)},t)}},8215:(e,t,n)=>{"use strict";n.d(t,{i6:()=>m,Qc:()=>v,zX:()=>p,D9:()=>f,Ql:()=>h});var a=n(9616),i=n(3219);function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}var o=n(6983);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,n){return c=s()?Reflect.construct.bind():function(e,t,n){var a=[null];a.push.apply(a,t);var i=new(Function.bind.apply(e,a));return n&&(0,o.Z)(i,n.prototype),i},c.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return c(e,arguments,r(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),(0,o.Z)(a,e)},l(e)}var d=n(7378),u=n(161).Z.canUseDOM?d.useLayoutEffect:d.useEffect;function p(e){var t=(0,d.useRef)(e);return u((function(){t.current=e}),[e]),(0,d.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,d.useRef)();return u((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var i,r,o,s,c;return(c=e.call(this)||this).name="ReactContextError",c.message="Hook "+(null!=(i=null==(r=c.stack)||null==(o=r.split("\n")[1])||null==(s=o.match((0,a.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:s.groups.name)?i:"")+" is called outside the <"+t+">. "+(null!=n?n:""),c}return(0,i.Z)(t,e),t}(l(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,d.useMemo)((function(){return e}),t.flat())}function v(e){return function(t){var n=t.children;return d.createElement(d.Fragment,null,e.reduceRight((function(e,t){return d.createElement(t,null,e)}),n))}}},1503:(e,t,n)=>{"use strict";function a(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:()=>a})},8862:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>o,Ns:()=>s});var a=n(7378),i=n(6623),r=n(353);function o(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,r.Z)().siteConfig.baseUrl;return(0,a.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(a).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:i.Z,baseUrl:e})}),[e])}},3457:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>c,RF:()=>u,o5:()=>p});var a=n(7378),i=n(161),r=n(6457),o=n(8215);var s=a.createContext(void 0);function c(e){var t,n=e.children,i=(t=(0,a.useRef)(!0),(0,a.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return a.createElement(s.Provider,{value:i},n)}function l(){var e=(0,a.useContext)(s);if(null==e)throw new o.i6("ScrollControllerProvider");return e}var d=function(){return i.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function u(e,t){void 0===t&&(t=[]);var n=l().scrollEventsEnabledRef,i=(0,a.useRef)(d()),r=(0,o.zX)(e);(0,a.useEffect)((function(){var e=function(){if(n.current){var e=d();r(e,i.current),i.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[r,n].concat(t))}function p(){var e,t,n,i=l(),r=(e=(0,a.useRef)({elem:null,top:0}),t=(0,a.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,a.useCallback)((function(){var t=e.current,n=t.elem,a=t.top;if(!n)return{restored:!1};var i=n.getBoundingClientRect().top-a;return i&&window.scrollBy({left:0,top:i}),e.current={elem:null,top:0},{restored:0!==i}}),[]),(0,a.useMemo)((function(){return{save:t,restore:n}}),[n,t])),o=(0,a.useRef)(void 0),s=(0,a.useCallback)((function(e){r.save(e),i.disableScrollEvents(),o.current=function(){var e=r.restore().restored;if(o.current=void 0,e){window.addEventListener("scroll",(function e(){i.enableScrollEvents(),window.removeEventListener("scroll",e)}))}else i.enableScrollEvents()}}),[i,r]);return(0,a.useLayoutEffect)((function(){queueMicrotask((function(){return null==o.current?void 0:o.current()}))})),{blockElementScrollPositionUntilNextRender:s}}function f(){var e=(0,a.useRef)(null),t=(0,r.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function a(){var i=document.documentElement.scrollTop;(n&&i>e||!n&&i{"use strict";n.d(t,{HX:()=>o,_q:()=>c,os:()=>s});var a=n(2935),i=n(353),r=n(4453),o="default";function s(e,t){return"docs-"+e+"-"+t}function c(){var e=(0,i.Z)().i18n,t=(0,a._r)(),n=(0,a.WS)(),c=(0,r.Oh)();var l=[o].concat(Object.keys(t).map((function(e){var a,i=(null==n?void 0:n.activePlugin.pluginId)===e?n.activeVersion:void 0,r=c[e],o=t[e].versions.find((function(e){return e.isLast}));return s(e,(null!=(a=null!=i?i:r)?a:o).name)})));return{locale:e.currentLocale,tags:l}}},1819:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>u,WA:()=>d});var a=n(7378),i=n(644),r="localStorage";function o(e){var t=e.key,n=e.oldValue,a=e.newValue,i=e.storage;if(n!==a){var r=document.createEvent("StorageEvent");r.initStorageEvent("storage",!1,!1,t,n,a,window.location.href,i),window.dispatchEvent(r)}}function s(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,c||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),c=!0),null}var t}var c=!1;var l={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function d(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(e);var n=s(null==t?void 0:t.persistence);return null===n?l:{get:function(){try{return n.getItem(e)}catch(t){return console.error("Docusaurus storage error, can't get key="+e,t),null}},set:function(t){try{var a=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:a,newValue:t,storage:n})}catch(i){console.error("Docusaurus storage error, can't set "+e+"="+t,i)}},del:function(){try{var t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(a){console.error("Docusaurus storage error, can't delete key="+e,a)}},listen:function(t){try{var a=function(a){a.storageArea===n&&a.key===e&&t(a)};return window.addEventListener("storage",a),function(){return window.removeEventListener("storage",a)}}catch(i){return console.error("Docusaurus storage error, can't listen for changes of key="+e,i),function(){}}}}}function u(e,t){var n=(0,a.useRef)((function(){return null===e?l:d(e,t)})).current(),r=(0,a.useCallback)((function(e){return"undefined"==typeof window?function(){}:n.listen(e)}),[n]);return[(0,i.useSyncExternalStore)(r,(function(){return"undefined"==typeof window?null:n.get()}),(function(){return null})),n]}},3714:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var a=n(353),i=n(3620);function r(){var e=(0,a.Z)(),t=e.siteConfig,n=t.baseUrl,r=t.url,o=e.i18n,s=o.defaultLocale,c=o.currentLocale,l=(0,i.TH)().pathname,d=c===s?n:n.replace("/"+c+"/","/"),u=l.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?r:"")+function(e){return e===s?""+d:""+d+e+"/"}(t)+u}}}},4993:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var a=n(7378),i=n(3620),r=n(8215);function o(e){var t=(0,i.TH)(),n=(0,r.D9)(t),o=(0,r.zX)(e);(0,a.useEffect)((function(){n&&t!==n&&o({location:t,previousLocation:n})}),[o,t,n])}},624:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var a=n(353);function i(){return(0,a.Z)().siteConfig.themeConfig}},632:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var a=n(353);function i(){return(0,a.Z)().siteConfig.themeConfig}},2473:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var a=n(7378),i=n(1503),r=n(8948),o=n(632);function s(){var e=(0,r.C)().withBaseUrl,t=(0,o.L)().algolia,n=t.externalUrlRegex,s=t.replaceSearchResultPathname;return(0,a.useCallback)((function(t){var a=new URL(t);if((0,i.F)(n,a.href))return t;var r=""+(a.pathname+a.hash);return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(r,s))}),[e,n,s])}},2520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.trailingSlash,a=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i,r=e.split(/[#?]/)[0],o="/"===r||r===a?r:(i=r,n?function(e){return e.endsWith("/")?e:e+"/"}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));return e.replace(r,o)}},6102:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t].concat(e(t.cause)):[t]}},1721:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="post-content";var i=n(2520);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return a(i).default}});var r=n(6102);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return r.getErrorCausalChain}})},6623:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(7378),i=n(5773),r=n(1237),o=n.n(r),s=n(6887);const c={"01b164d8":[function(){return n.e(3716).then(n.bind(n,1037))},"@site/versioned_docs/version-6.7.0/feature-error-messages.md",1037],"02855f38":[function(){return n.e(7857).then(n.t.bind(n,5864,19))},"~docs/default/version-6-3-0-metadata-prop-ee0.json",5864],"03a88bad":[function(){return Promise.all([n.e(532),n.e(6568)]).then(n.bind(n,6257))},"@site/../docs/index.md",6257],"04f4d10e":[function(){return n.e(2804).then(n.bind(n,6044))},"@site/versioned_docs/version-6.5.0/api-matched-data.md",6044],"057e32cd":[function(){return Promise.all([n.e(532),n.e(7510)]).then(n.bind(n,7204))},"@site/../docs/api/check-schema.md",7204],"0669159b":[function(){return n.e(1455).then(n.t.bind(n,5896,19))},"~docs/default/category-docs-docs-category-express-validator-guides-282.json",5896],"0761ccf0":[function(){return n.e(7194).then(n.bind(n,7174))},"@site/versioned_docs/version-6.8.0/feature-sanitization.md",7174],"09a3d573":[function(){return n.e(3574).then(n.bind(n,2024))},"@site/versioned_docs/version-6.8.0/feature-custom-validators-sanitizers.md",2024],"09b1f4ec":[function(){return n.e(6064).then(n.bind(n,5226))},"@site/versioned_docs/version-6.14.0/api-validation-chain.md",5226],"09ed2da6":[function(){return n.e(496).then(n.bind(n,5923))},"@site/versioned_docs/version-6.6.0/feature-sanitization.md",5923],"0a0856d1":[function(){return n.e(6697).then(n.bind(n,246))},"@site/versioned_docs/version-6.11.0/faq.md",246],"0a484b7f":[function(){return n.e(6539).then(n.bind(n,2447))},"@site/versioned_docs/version-6.14.0/api-filter.md",2447],"0a830855":[function(){return n.e(4089).then(n.bind(n,1848))},"@site/versioned_docs/version-6.5.0/feature-custom-validators-sanitizers.md",1848],"0bd1d967":[function(){return n.e(2131).then(n.bind(n,2444))},"@site/versioned_docs/version-6.13.0/feature-error-messages.md",2444],"0c9e3a88":[function(){return n.e(8792).then(n.bind(n,1922))},"@site/versioned_docs/version-5.2.0/feature-wildcards.md",1922],"0d5720d7":[function(){return n.e(2584).then(n.bind(n,8738))},"@site/versioned_docs/version-6.11.0/feature-schema-validation.md",8738],"0e3d8387":[function(){return n.e(7823).then(n.bind(n,6002))},"@site/versioned_docs/version-6.5.0/feature-whole-body-validation.md",6002],"0ff7615f":[function(){return n.e(8915).then(n.bind(n,4063))},"@site/versioned_docs/version-6.11.0/feature-wildcards.md",4063],10564578:[function(){return n.e(8635).then(n.t.bind(n,9566,19))},"~docs/default/version-6-14-0-metadata-prop-b83.json",9566],"108bd67c":[function(){return n.e(2152).then(n.bind(n,9101))},"@site/versioned_docs/version-6.1.0/api-check.md",9101],"115cd9a3":[function(){return n.e(821).then(n.bind(n,8500))},"@site/versioned_docs/version-6.1.0/feature-error-messages.md",8500],11773138:[function(){return n.e(1239).then(n.bind(n,103))},"@site/versioned_docs/version-5.3.0/feature-schema-validation.md",103],"1289b509":[function(){return Promise.all([n.e(532),n.e(1593)]).then(n.bind(n,2682))},"@site/versioned_docs/version-6.12.0/feature-running-imperatively.md",2682],"12cd9398":[function(){return n.e(5838).then(n.bind(n,4656))},"@site/versioned_docs/version-6.14.0/api-matched-data.md",4656],"1356c1e0":[function(){return n.e(6003).then(n.bind(n,1386))},"@site/versioned_docs/version-6.4.0/feature-running-imperatively.md",1386],"141f29dd":[function(){return n.e(7825).then(n.bind(n,4676))},"@site/versioned_docs/version-6.12.0/api-check.md",4676],"143fd892":[function(){return Promise.all([n.e(532),n.e(2116)]).then(n.bind(n,5936))},"@site/../docs/api/one-of.md",5936],"14eb3368":[function(){return Promise.all([n.e(532),n.e(9817)]).then(n.bind(n,777))},"@theme/DocCategoryGeneratedIndexPage",777],"1625e41d":[function(){return n.e(2027).then(n.bind(n,2008))},"@site/versioned_docs/version-6.0.0/api-sanitization-chain.md",2008],"16ad331b":[function(){return n.e(769).then(n.bind(n,3858))},"@site/../docs/migration-v5-to-v6.md",3858],"1786974b":[function(){return n.e(8626).then(n.bind(n,719))},"@site/versioned_docs/version-6.15.0/api-validation-chain.md",719],17896441:[function(){return Promise.all([n.e(532),n.e(7918)]).then(n.bind(n,2785))},"@theme/DocItem",2785],"18a48af9":[function(){return n.e(2657).then(n.bind(n,9463))},"@site/versioned_docs/version-6.0.0/feature-whole-body-validation.md",9463],"1927753e":[function(){return n.e(8115).then(n.t.bind(n,3081,19))},"~docs/default/version-6-2-0-metadata-prop-810.json",3081],"19cdea2a":[function(){return n.e(4402).then(n.bind(n,44))},"@site/versioned_docs/version-6.14.0/feature-sanitization.md",44],"1a4e3797":[function(){return Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,1174))},"@theme/SearchPage",1174],"1a50ba5c":[function(){return n.e(9200).then(n.bind(n,4014))},"@site/versioned_docs/version-6.4.0/feature-schema-validation.md",4014],"1a74ecf5":[function(){return n.e(6296).then(n.bind(n,561))},"@site/versioned_docs/version-6.3.0/feature-sanitization.md",561],"1b317434":[function(){return n.e(2028).then(n.bind(n,3280))},"@site/versioned_docs/version-5.3.0/api-legacy.md",3280],"1bcb6c12":[function(){return n.e(1218).then(n.bind(n,2870))},"@site/versioned_docs/version-6.5.0/api-check.md",2870],"1be1dd71":[function(){return n.e(7596).then(n.bind(n,4115))},"@site/versioned_docs/version-6.11.0/feature-whole-body-validation.md",4115],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,5553))},"@theme/DocPage",5553],"1c39fe1c":[function(){return Promise.all([n.e(532),n.e(6252)]).then(n.bind(n,9444))},"@site/versioned_docs/version-6.12.0/index.md",9444],"1d64ce3b":[function(){return n.e(8974).then(n.bind(n,6005))},"@site/versioned_docs/version-6.12.0/feature-sanitization.md",6005],"1eba2b69":[function(){return n.e(7124).then(n.bind(n,9819))},"@site/versioned_docs/version-6.6.0/feature-wildcards.md",9819],"20f77e87":[function(){return n.e(1651).then(n.t.bind(n,5091,19))},"~docs/default/version-6-9-0-metadata-prop-8e3.json",5091],"2285ff78":[function(){return n.e(9961).then(n.bind(n,5924))},"@site/versioned_docs/version-6.9.0/index.md",5924],"235a3768":[function(){return n.e(3150).then(n.bind(n,9108))},"@site/versioned_docs/version-6.15.0/feature-sanitization.md",9108],"23c664e3":[function(){return n.e(1050).then(n.bind(n,2300))},"@site/../docs/architecture.md",2300],"249142be":[function(){return n.e(6857).then(n.bind(n,3286))},"@site/versioned_docs/version-6.4.0/feature-custom-validators-sanitizers.md",3286],"25c500d7":[function(){return Promise.all([n.e(532),n.e(4894)]).then(n.bind(n,5418))},"@site/versioned_docs/version-6.15.0/api-validation-result.mdx",5418],"2718a84a":[function(){return n.e(9166).then(n.bind(n,227))},"@site/versioned_docs/version-6.1.0/api-validation-chain.md",227],"280ddd3f":[function(){return n.e(3925).then(n.bind(n,2577))},"@site/versioned_docs/version-6.12.0/feature-whole-body-validation.md",2577],"28cf53e0":[function(){return n.e(7230).then(n.bind(n,4098))},"@site/versioned_docs/version-6.2.0/index.md",4098],"29381d51":[function(){return n.e(2420).then(n.t.bind(n,6307,19))},"~docs/default/category-docs-docs-category-migration-guides-e32.json",6307],"2a1f3a69":[function(){return n.e(6743).then(n.bind(n,7863))},"@site/versioned_docs/version-5.2.0/feature-schema-validation.md",7863],"2a2911a0":[function(){return n.e(4564).then(n.bind(n,3542))},"@site/versioned_docs/version-6.8.0/api-sanitization-chain.md",3542],"2ac7523a":[function(){return n.e(742).then(n.t.bind(n,1438,19))},"~docs/default/version-6-8-0-metadata-prop-a26.json",1438],"2b577994":[function(){return n.e(1290).then(n.bind(n,9259))},"@site/versioned_docs/version-6.5.0/feature-schema-validation.md",9259],"2b6906c9":[function(){return n.e(2218).then(n.t.bind(n,751,19))},"~docs/default/version-7-0-0-metadata-prop-cd6.json",751],"2d750523":[function(){return n.e(9943).then(n.bind(n,7702))},"@site/versioned_docs/version-6.15.0/feature-whole-body-validation.md",7702],"2d780b31":[function(){return n.e(6138).then(n.bind(n,4843))},"@site/versioned_docs/version-6.13.0/feature-whole-body-validation.md",4843],"313a01e8":[function(){return n.e(1321).then(n.t.bind(n,1666,19))},"~docs/default/version-6-11-0-metadata-prop-e7c.json",1666],"31cac2d3":[function(){return n.e(4372).then(n.bind(n,9544))},"@site/versioned_docs/version-6.12.0/feature-error-messages.md",9544],"31f4abdf":[function(){return n.e(4340).then(n.bind(n,6440))},"@site/versioned_docs/version-6.6.0/api-matched-data.md",6440],"32280d2a":[function(){return n.e(7073).then(n.bind(n,7461))},"@site/versioned_docs/version-6.3.0/api-check.md",7461],"32725dec":[function(){return n.e(9252).then(n.bind(n,841))},"@site/versioned_docs/version-6.2.0/api-validation-chain.md",841],"329a2b2c":[function(){return n.e(4371).then(n.bind(n,9788))},"@site/versioned_docs/version-6.9.0/api-validation-result.md",9788],"35a54963":[function(){return n.e(8245).then(n.bind(n,4965))},"@site/versioned_docs/version-7.0.0/api/matched-data.md",4965],"35be87b0":[function(){return n.e(3598).then(n.bind(n,3701))},"@site/versioned_docs/version-6.8.0/feature-error-messages.md",3701],"3611a290":[function(){return n.e(8576).then(n.bind(n,4146))},"@site/versioned_docs/version-5.2.0/api-check.md",4146],"3807d7d6":[function(){return n.e(2227).then(n.bind(n,7158))},"@site/versioned_docs/version-6.1.0/index.md",7158],"392f1828":[function(){return n.e(4014).then(n.bind(n,6945))},"@site/versioned_docs/version-6.0.0/api-matched-data.md",6945],"39d2b2a1":[function(){return n.e(8520).then(n.bind(n,5251))},"@site/versioned_docs/version-6.5.0/feature-running-imperatively.md",5251],"3a190d01":[function(){return n.e(7682).then(n.bind(n,6470))},"@site/versioned_docs/version-6.10.0/api-validation-chain.md",6470],"3a4485c3":[function(){return n.e(3624).then(n.bind(n,6569))},"@site/versioned_docs/version-5.2.0/api-sanitization-chain.md",6569],"3aff40da":[function(){return n.e(2553).then(n.bind(n,5735))},"@site/versioned_docs/version-5.3.0/feature-error-messages.md",5735],"3ba47c53":[function(){return n.e(5671).then(n.bind(n,4933))},"@site/versioned_docs/version-5.3.0/api-sanitization-chain.md",4933],"3bebfd13":[function(){return n.e(2810).then(n.bind(n,8927))},"@site/versioned_docs/version-6.4.0/api-filter.md",8927],"3cc4a212":[function(){return n.e(3297).then(n.bind(n,8827))},"@site/versioned_docs/version-6.15.0/feature-error-messages.md",8827],"3e43c26d":[function(){return n.e(6302).then(n.bind(n,6890))},"@site/versioned_docs/version-6.5.0/api-filter.md",6890],"3f3aaba7":[function(){return n.e(134).then(n.t.bind(n,6551,19))},"~docs/default/version-6-15-0-metadata-prop-292.json",6551],"4031e9f7":[function(){return n.e(7897).then(n.t.bind(n,2828,19))},"~docs/default/version-6-13-0-metadata-prop-085.json",2828],"406269e3":[function(){return n.e(4488).then(n.bind(n,9845))},"@site/versioned_docs/version-6.9.0/api-validation-chain.md",9845],"40637d96":[function(){return n.e(7353).then(n.bind(n,925))},"@site/versioned_docs/version-6.10.0/api-check.md",925],"41395dbd":[function(){return n.e(719).then(n.bind(n,3952))},"@site/versioned_docs/version-5.3.0/feature-sanitization.md",3952],"415d22d3":[function(){return Promise.all([n.e(532),n.e(5326)]).then(n.bind(n,5464))},"@site/versioned_docs/version-6.13.0/feature-running-imperatively.md",5464],"43bc6ea7":[function(){return n.e(8806).then(n.bind(n,9266))},"@site/versioned_docs/version-6.3.0/api-filter.md",9266],"45b4adc3":[function(){return n.e(4415).then(n.bind(n,5119))},"@site/versioned_docs/version-6.0.0/feature-schema-validation.md",5119],"464acffe":[function(){return n.e(5297).then(n.bind(n,7372))},"@site/versioned_docs/version-6.1.0/feature-running-imperatively.md",7372],"46a1d8da":[function(){return Promise.all([n.e(532),n.e(6749)]).then(n.bind(n,770))},"@site/versioned_docs/version-6.15.0/feature-custom-validators-sanitizers.mdx",770],"46df1549":[function(){return Promise.all([n.e(532),n.e(3212)]).then(n.bind(n,231))},"@site/versioned_docs/version-6.12.0/api-validation-result.md",231],"49a2de41":[function(){return n.e(3539).then(n.bind(n,3071))},"@site/versioned_docs/version-6.13.0/feature-sanitization.md",3071],"49e32276":[function(){return Promise.all([n.e(532),n.e(6199)]).then(n.bind(n,7176))},"@site/versioned_docs/version-6.11.0/index.md",7176],"4bd184f6":[function(){return n.e(954).then(n.bind(n,2327))},"@site/versioned_docs/version-6.15.0/api-filter.md",2327],"4c33d3af":[function(){return n.e(3361).then(n.bind(n,5816))},"@site/versioned_docs/version-6.7.0/api-sanitization-chain.md",5816],"4c8950db":[function(){return n.e(2796).then(n.bind(n,2501))},"@site/versioned_docs/version-7.0.0/api/validation-chain.md",2501],"4d9fef28":[function(){return Promise.all([n.e(532),n.e(9952)]).then(n.bind(n,8041))},"@site/versioned_docs/version-6.10.0/feature-running-imperatively.md",8041],"4e289b8c":[function(){return Promise.all([n.e(532),n.e(6787)]).then(n.bind(n,1222))},"@site/versioned_docs/version-7.0.0/api/express-validator.md",1222],"4f65b59d":[function(){return n.e(6775).then(n.bind(n,8541))},"@site/versioned_docs/version-6.4.0/index.md",8541],"4fa180b0":[function(){return n.e(777).then(n.bind(n,9896))},"@site/versioned_docs/version-6.10.0/api-filter.md",9896],"4ff64585":[function(){return n.e(3367).then(n.bind(n,26))},"@site/versioned_docs/version-6.2.0/feature-custom-validators-sanitizers.md",26],"5091bfe8":[function(){return n.e(8909).then(n.bind(n,1165))},"@site/versioned_docs/version-6.8.0/api-validation-result.md",1165],"5141b302":[function(){return Promise.all([n.e(532),n.e(6391)]).then(n.bind(n,2317))},"@site/../docs/guides/customizing.md",2317],"5192a38d":[function(){return n.e(2487).then(n.bind(n,1364))},"@site/versioned_docs/version-5.2.0/feature-whole-body-validation.md",1364],"51ec4823":[function(){return n.e(4929).then(n.bind(n,5436))},"@site/versioned_docs/version-6.5.0/api-validation-result.md",5436],"5239ef28":[function(){return n.e(2306).then(n.bind(n,1738))},"@site/versioned_docs/version-6.6.0/api-validation-chain.md",1738],"52d32b65":[function(){return n.e(1981).then(n.bind(n,803))},"@site/../docs/api/matched-data.md",803],"531e34f7":[function(){return n.e(6549).then(n.bind(n,2332))},"@site/versioned_docs/version-6.0.0/feature-custom-validators-sanitizers.md",2332],"5375b588":[function(){return n.e(1526).then(n.bind(n,5459))},"@site/versioned_docs/version-6.10.0/feature-sanitization.md",5459],"53d239a6":[function(){return n.e(5941).then(n.bind(n,3671))},"@site/versioned_docs/version-6.3.0/api-validation-chain.md",3671],"544ce753":[function(){return n.e(8369).then(n.bind(n,4223))},"@site/versioned_docs/version-6.11.0/api-filter.md",4223],"5485dabc":[function(){return n.e(8174).then(n.bind(n,7011))},"@site/versioned_docs/version-6.9.0/feature-schema-validation.md",7011],"552c4e0c":[function(){return Promise.all([n.e(532),n.e(2575)]).then(n.bind(n,6455))},"@site/versioned_docs/version-6.14.0/index.mdx",6455],"56abd55d":[function(){return n.e(2436).then(n.bind(n,58))},"@site/versioned_docs/version-6.0.0/feature-error-messages.md",58],"56f260e6":[function(){return n.e(6571).then(n.t.bind(n,9521,19))},"~docs/default/version-6-5-0-metadata-prop-104.json",9521],"576fbfe0":[function(){return n.e(8242).then(n.bind(n,2876))},"@site/versioned_docs/version-6.7.0/api-validation-result.md",2876],"58eb6a88":[function(){return n.e(936).then(n.bind(n,5718))},"@site/versioned_docs/version-6.2.0/feature-running-imperatively.md",5718],"59394caa":[function(){return n.e(3099).then(n.bind(n,6632))},"@site/versioned_docs/version-6.2.0/api-filter.md",6632],"59e4c8ed":[function(){return n.e(7651).then(n.bind(n,9054))},"@site/versioned_docs/version-6.11.0/api-validation-chain.md",9054],"5a8128fc":[function(){return n.e(5961).then(n.bind(n,5485))},"@site/versioned_docs/version-6.6.0/index.md",5485],"5c213362":[function(){return Promise.all([n.e(532),n.e(9601)]).then(n.bind(n,7030))},"@site/versioned_docs/version-6.10.0/index.md",7030],"5cd6c63e":[function(){return n.e(2225).then(n.bind(n,6508))},"@site/versioned_docs/version-6.3.0/feature-whole-body-validation.md",6508],"5d391cac":[function(){return n.e(3351).then(n.bind(n,7369))},"@site/versioned_docs/version-5.3.0/feature-custom-validators-sanitizers.md",7369],"5dcb72f3":[function(){return n.e(7895).then(n.bind(n,7776))},"@site/versioned_docs/version-6.4.0/feature-whole-body-validation.md",7776],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,6809))},"@generated/docusaurus.config",6809],"5ef10653":[function(){return n.e(631).then(n.bind(n,2476))},"@site/versioned_docs/version-6.7.0/api-validation-chain.md",2476],"606deeae":[function(){return n.e(2316).then(n.bind(n,15))},"@site/versioned_docs/version-6.9.0/feature-sanitization.md",15],"609507dd":[function(){return Promise.all([n.e(532),n.e(2803)]).then(n.bind(n,546))},"@site/../docs/api/express-validator.md",546],"60e2c3e9":[function(){return n.e(9245).then(n.bind(n,4648))},"@site/../docs/api/check.md",4648],61465158:[function(){return Promise.all([n.e(532),n.e(7181)]).then(n.bind(n,6203))},"@site/versioned_docs/version-6.15.0/index.mdx",6203],"614c5cb3":[function(){return n.e(1940).then(n.bind(n,7766))},"@site/versioned_docs/version-6.15.0/faq.md",7766],"620c1ecf":[function(){return n.e(7376).then(n.bind(n,5847))},"@site/versioned_docs/version-6.15.0/feature-wildcards.md",5847],"62637bea":[function(){return n.e(5453).then(n.bind(n,9391))},"@site/versioned_docs/version-6.4.0/api-validation-result.md",9391],"62fe928d":[function(){return n.e(8143).then(n.bind(n,5533))},"@site/versioned_docs/version-6.7.0/feature-whole-body-validation.md",5533],"6321fd3f":[function(){return n.e(4199).then(n.bind(n,7224))},"@site/versioned_docs/version-6.11.0/feature-sanitization.md",7224],"6336d072":[function(){return n.e(7562).then(n.bind(n,5753))},"@site/versioned_docs/version-6.6.0/api-check.md",5753],"633ab802":[function(){return n.e(7354).then(n.bind(n,4466))},"@site/versioned_docs/version-5.3.0/feature-whole-body-validation.md",4466],"6421a520":[function(){return n.e(3815).then(n.bind(n,9880))},"@site/versioned_docs/version-6.14.0/feature-schema-validation.md",9880],"643d8a8d":[function(){return n.e(7901).then(n.bind(n,1261))},"@site/versioned_docs/version-7.0.0/guides/validation-chain.md",1261],"690d9910":[function(){return n.e(3230).then(n.bind(n,9228))},"@site/versioned_docs/version-6.3.0/feature-wildcards.md",9228],"6a498910":[function(){return n.e(2554).then(n.bind(n,7186))},"@site/versioned_docs/version-6.4.0/api-sanitization-chain.md",7186],"6ba78147":[function(){return n.e(6167).then(n.bind(n,676))},"@site/versioned_docs/version-6.2.0/feature-wildcards.md",676],"6c20e6ff":[function(){return n.e(985).then(n.bind(n,5480))},"@site/versioned_docs/version-7.0.0/architecture.md",5480],"6c584ec9":[function(){return n.e(272).then(n.bind(n,5404))},"@site/versioned_docs/version-6.13.0/migration-v5-to-v6.md",5404],"6c93fab4":[function(){return n.e(2688).then(n.t.bind(n,4697,19))},"~docs/default/version-6-4-0-metadata-prop-d9f.json",4697],"6f6762d6":[function(){return Promise.all([n.e(532),n.e(2655)]).then(n.bind(n,4911))},"@site/versioned_docs/version-7.0.0/api/check-schema.md",4911],"7192b7de":[function(){return n.e(731).then(n.bind(n,499))},"@site/versioned_docs/version-6.13.0/api-sanitization-chain.md",499],"73da8aa8":[function(){return n.e(7839).then(n.bind(n,6170))},"@site/versioned_docs/version-6.7.0/feature-running-imperatively.md",6170],"744891a1":[function(){return Promise.all([n.e(532),n.e(550)]).then(n.bind(n,589))},"@site/versioned_docs/version-7.0.0/api/validation-result.md",589],"74c840dd":[function(){return Promise.all([n.e(532),n.e(8843)]).then(n.bind(n,5728))},"@site/versioned_docs/version-6.11.0/feature-custom-validators-sanitizers.md",5728],"74feb7e9":[function(){return n.e(1444).then(n.bind(n,9075))},"@site/versioned_docs/version-5.3.0/api-check.md",9075],"754a5aa1":[function(){return Promise.all([n.e(532),n.e(1908)]).then(n.bind(n,3490))},"@site/versioned_docs/version-7.0.0/api/check-exact.md",3490],"780ab5fe":[function(){return n.e(5206).then(n.bind(n,254))},"@site/versioned_docs/version-6.9.0/feature-running-imperatively.md",254],"787bd795":[function(){return Promise.all([n.e(532),n.e(3535)]).then(n.bind(n,3494))},"@site/versioned_docs/version-6.13.0/index.md",3494],"7a1f4a4b":[function(){return n.e(5393).then(n.bind(n,1393))},"@site/versioned_docs/version-6.9.0/feature-whole-body-validation.md",1393],"7a39c63d":[function(){return n.e(2788).then(n.bind(n,1122))},"@site/versioned_docs/version-7.0.0/migration-v6-to-v7.md",1122],"7b9d511f":[function(){return n.e(8940).then(n.bind(n,9448))},"@site/versioned_docs/version-6.11.0/api-check.md",9448],"7bb53413":[function(){return n.e(4361).then(n.bind(n,8312))},"@site/versioned_docs/version-6.6.0/feature-running-imperatively.md",8312],"7e82ff00":[function(){return n.e(6971).then(n.bind(n,2126))},"@site/../docs/migration-v6-to-v7.md",2126],"801cd2ac":[function(){return n.e(6601).then(n.bind(n,9609))},"@site/versioned_docs/version-6.6.0/feature-whole-body-validation.md",9609],"807e0e7f":[function(){return n.e(1642).then(n.bind(n,5637))},"@site/versioned_docs/version-6.8.0/feature-whole-body-validation.md",5637],"80a7c393":[function(){return n.e(7351).then(n.bind(n,1241))},"@site/versioned_docs/version-6.11.0/api-matched-data.md",1241],"81c85956":[function(){return n.e(4567).then(n.bind(n,6504))},"@site/versioned_docs/version-5.3.0/feature-wildcards.md",6504],"81d235f1":[function(){return n.e(4654).then(n.bind(n,5614))},"@site/versioned_docs/version-6.4.0/feature-sanitization.md",5614],"81fa8341":[function(){return n.e(415).then(n.bind(n,7215))},"@site/versioned_docs/version-6.1.0/feature-custom-validators-sanitizers.md",7215],"81fb6d2e":[function(){return n.e(5149).then(n.bind(n,8028))},"@site/versioned_docs/version-6.14.0/feature-error-messages.md",8028],"8210fdb1":[function(){return n.e(1850).then(n.bind(n,9525))},"@site/versioned_docs/version-6.15.0/api-sanitization-chain.md",9525],"82b8438d":[function(){return n.e(8706).then(n.bind(n,3486))},"@site/versioned_docs/version-6.12.0/api-validation-chain.md",3486],83716646:[function(){return n.e(8671).then(n.bind(n,7621))},"@site/versioned_docs/version-6.6.0/api-filter.md",7621],"842f7607":[function(){return n.e(5722).then(n.bind(n,28))},"@site/versioned_docs/version-5.3.0/api-filter.md",28],"84527cbe":[function(){return n.e(2467).then(n.t.bind(n,5745,19))},"/Users/gustavohenke/Projects/express-validator/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],84854274:[function(){return n.e(7455).then(n.bind(n,3050))},"@site/versioned_docs/version-7.0.0/api/check.md",3050],"85522cfa":[function(){return n.e(8707).then(n.bind(n,8957))},"@site/versioned_docs/version-6.0.0/api-validation-result.md",8957],"8586747a":[function(){return n.e(1042).then(n.bind(n,1361))},"@site/versioned_docs/version-6.5.0/api-validation-chain.md",1361],"873012db":[function(){return n.e(7772).then(n.bind(n,862))},"@site/versioned_docs/version-6.2.0/feature-error-messages.md",862],"8786b357":[function(){return n.e(452).then(n.bind(n,8376))},"@site/versioned_docs/version-6.7.0/api-check.md",8376],"8932c20f":[function(){return n.e(573).then(n.bind(n,3337))},"@site/versioned_docs/version-6.1.0/feature-whole-body-validation.md",3337],"8accfa6b":[function(){return n.e(4998).then(n.t.bind(n,7512,19))},"~docs/default/version-6-10-0-metadata-prop-ce9.json",7512],"8b704fbf":[function(){return Promise.all([n.e(532),n.e(5601)]).then(n.bind(n,1696))},"@site/versioned_docs/version-7.0.0/api/one-of.md",1696],"8bead906":[function(){return n.e(9819).then(n.bind(n,3438))},"@site/versioned_docs/version-6.9.0/api-check.md",3438],"8c6e4059":[function(){return n.e(6824).then(n.bind(n,9330))},"@site/versioned_docs/version-6.2.0/feature-sanitization.md",9330],"8f8adbc7":[function(){return n.e(7946).then(n.bind(n,1286))},"@site/versioned_docs/version-6.12.0/api-matched-data.md",1286],"8fa8d26c":[function(){return Promise.all([n.e(532),n.e(2653)]).then(n.bind(n,2831))},"@site/versioned_docs/version-6.13.0/feature-custom-validators-sanitizers.md",2831],"90ebd9bb":[function(){return n.e(3479).then(n.bind(n,6386))},"@site/versioned_docs/version-6.9.0/api-sanitization-chain.md",6386],91266340:[function(){return n.e(9117).then(n.bind(n,3795))},"@site/versioned_docs/version-6.10.0/migration-v5-to-v6.md",3795],"91dcd4bd":[function(){return n.e(9265).then(n.bind(n,8522))},"@site/versioned_docs/version-6.13.0/api-filter.md",8522],"9269c30e":[function(){return n.e(8377).then(n.bind(n,7862))},"@site/versioned_docs/version-6.2.0/feature-schema-validation.md",7862],"928de919":[function(){return Promise.all([n.e(532),n.e(2660)]).then(n.bind(n,2819))},"@site/versioned_docs/version-6.13.0/api-validation-result.md",2819],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"94373f1a":[function(){return n.e(2308).then(n.bind(n,8986))},"@site/versioned_docs/version-6.7.0/feature-wildcards.md",8986],"953f1846":[function(){return Promise.all([n.e(532),n.e(9170)]).then(n.bind(n,3685))},"@site/versioned_docs/version-7.0.0/index.md",3685],"9667b125":[function(){return n.e(4933).then(n.bind(n,7652))},"@site/versioned_docs/version-6.14.0/feature-wildcards.md",7652],"97a83304":[function(){return n.e(4404).then(n.bind(n,3541))},"@site/versioned_docs/version-6.7.0/feature-custom-validators-sanitizers.md",3541],"97dbc2fa":[function(){return n.e(9376).then(n.bind(n,84))},"@site/versioned_docs/version-7.0.0/guides/schema-validation.md",84],"97e6230f":[function(){return Promise.all([n.e(532),n.e(6760)]).then(n.bind(n,5335))},"@site/../docs/guides/getting-started.md",5335],"994031bd":[function(){return n.e(1435).then(n.bind(n,7737))},"@site/versioned_docs/version-6.0.0/feature-sanitization.md",7737],"99dc5750":[function(){return n.e(2935).then(n.bind(n,6753))},"@site/versioned_docs/version-6.1.0/feature-sanitization.md",6753],"9ad59d1a":[function(){return n.e(6722).then(n.bind(n,8794))},"@site/versioned_docs/version-6.8.0/api-matched-data.md",8794],"9b025403":[function(){return n.e(6).then(n.bind(n,2492))},"@site/versioned_docs/version-6.15.0/feature-schema-validation.md",2492],"9cf56202":[function(){return n.e(1367).then(n.bind(n,5188))},"@site/versioned_docs/version-6.7.0/feature-sanitization.md",5188],"9d83e1d1":[function(){return n.e(7821).then(n.bind(n,4659))},"@site/versioned_docs/version-6.3.0/index.md",4659],"9daadb77":[function(){return n.e(6069).then(n.bind(n,8981))},"@site/versioned_docs/version-6.14.0/api-sanitization-chain.md",8981],"9e15f089":[function(){return n.e(4942).then(n.bind(n,522))},"@site/../docs/api/misc.md",522],"9e212ebb":[function(){return n.e(7849).then(n.bind(n,1509))},"@site/versioned_docs/version-6.10.0/api-matched-data.md",1509],"9eb21ad8":[function(){return n.e(6002).then(n.bind(n,1436))},"@site/versioned_docs/version-6.0.0/feature-wildcards.md",1436],"9efd0bac":[function(){return n.e(7184).then(n.bind(n,3460))},"@site/versioned_docs/version-6.7.0/index.md",3460],"9fd49971":[function(){return n.e(4387).then(n.t.bind(n,3769,19))},"/Users/gustavohenke/Projects/express-validator/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],a13cc575:[function(){return n.e(6428).then(n.bind(n,9888))},"@site/versioned_docs/version-6.8.0/api-validation-chain.md",9888],a13d31c2:[function(){return n.e(355).then(n.bind(n,4631))},"@site/versioned_docs/version-6.4.0/api-validation-chain.md",4631],a278eb8a:[function(){return n.e(7976).then(n.bind(n,2440))},"@site/versioned_docs/version-6.15.0/api-check.md",2440],a2f4a134:[function(){return n.e(8562).then(n.bind(n,4642))},"@site/versioned_docs/version-6.0.0/feature-running-imperatively.md",4642],a36d4da6:[function(){return n.e(4679).then(n.bind(n,8552))},"@site/versioned_docs/version-6.0.0/index.md",8552],a3b3261e:[function(){return n.e(7466).then(n.bind(n,3449))},"@site/versioned_docs/version-6.13.0/api-validation-chain.md",3449],a421f136:[function(){return n.e(2924).then(n.bind(n,2389))},"@site/versioned_docs/version-6.4.0/feature-error-messages.md",2389],a46578cf:[function(){return n.e(8179).then(n.bind(n,9422))},"@site/versioned_docs/version-6.14.0/faq.md",9422],a4c58ea5:[function(){return n.e(7118).then(n.bind(n,8642))},"@site/versioned_docs/version-6.3.0/api-matched-data.md",8642],a554bc57:[function(){return n.e(8921).then(n.bind(n,857))},"@site/versioned_docs/version-6.5.0/feature-error-messages.md",857],a5b875af:[function(){return Promise.all([n.e(532),n.e(7593)]).then(n.bind(n,8193))},"@site/versioned_docs/version-6.10.0/feature-custom-validators-sanitizers.md",8193],a75ec5e6:[function(){return n.e(6639).then(n.bind(n,4723))},"@site/versioned_docs/version-6.9.0/feature-wildcards.md",4723],a8124785:[function(){return n.e(4632).then(n.bind(n,309))},"@site/versioned_docs/version-7.0.0/guides/field-selection.md",309],a91c4286:[function(){return n.e(2771).then(n.t.bind(n,2253,19))},"~docs/default/category-docsnext-docs-category-migration-guides-6a3.json",2253],a9582fe4:[function(){return Promise.all([n.e(532),n.e(3916)]).then(n.bind(n,1816))},"@site/versioned_docs/version-6.14.0/feature-custom-validators-sanitizers.mdx",1816],a9abf8f4:[function(){return n.e(7813).then(n.bind(n,2010))},"@site/versioned_docs/version-6.9.0/api-matched-data.md",2010],aba198a0:[function(){return n.e(6762).then(n.bind(n,3752))},"@site/versioned_docs/version-6.0.0/api-check.md",3752],acc6ec00:[function(){return Promise.all([n.e(532),n.e(4728)]).then(n.bind(n,858))},"@site/versioned_docs/version-6.15.0/feature-running-imperatively.mdx",858],acfe585e:[function(){return n.e(5003).then(n.bind(n,4726))},"@site/versioned_docs/version-6.14.0/api-check.md",4726],ad0d1242:[function(){return n.e(6603).then(n.bind(n,6266))},"@site/versioned_docs/version-6.13.0/faq.md",6266],adde0795:[function(){return n.e(9493).then(n.bind(n,2909))},"@site/versioned_docs/version-6.2.0/api-check.md",2909],af5aa801:[function(){return n.e(1658).then(n.bind(n,5301))},"@site/versioned_docs/version-6.2.0/api-validation-result.md",5301],aff97f8f:[function(){return n.e(7320).then(n.bind(n,3508))},"@site/versioned_docs/version-5.3.0/api-validation-chain.md",3508],b0b18499:[function(){return n.e(7045).then(n.bind(n,4332))},"@site/versioned_docs/version-6.5.0/feature-sanitization.md",4332],b2ce4c9b:[function(){return n.e(1343).then(n.bind(n,5659))},"@site/versioned_docs/version-6.8.0/api-filter.md",5659],b2d3a646:[function(){return n.e(9609).then(n.bind(n,5563))},"@site/versioned_docs/version-6.12.0/api-sanitization-chain.md",5563],b3206f11:[function(){return n.e(1049).then(n.t.bind(n,7608,19))},"~docs/default/version-6-6-0-metadata-prop-fcc.json",7608],b3532997:[function(){return Promise.all([n.e(532),n.e(7035)]).then(n.bind(n,7791))},"@site/versioned_docs/version-7.0.0/guides/manually-running.md",7791],b5072790:[function(){return n.e(4205).then(n.bind(n,1525))},"@site/versioned_docs/version-6.12.0/feature-wildcards.md",1525],b5804665:[function(){return n.e(410).then(n.bind(n,7761))},"@site/../docs/guides/schema-validation.md",7761],b605821b:[function(){return n.e(5511).then(n.bind(n,1853))},"@site/versioned_docs/version-6.11.0/api-sanitization-chain.md",1853],b6abd322:[function(){return n.e(5420).then(n.bind(n,9748))},"@site/versioned_docs/version-6.6.0/api-validation-result.md",9748],b830c51f:[function(){return n.e(2496).then(n.bind(n,7784))},"@site/versioned_docs/version-5.2.0/api-filter.md",7784],b85acdea:[function(){return n.e(2400).then(n.bind(n,6168))},"@site/versioned_docs/version-5.2.0/index.md",6168],b8f5ca21:[function(){return Promise.all([n.e(532),n.e(8430)]).then(n.bind(n,4407))},"@site/versioned_docs/version-6.14.0/feature-running-imperatively.mdx",4407],bb7899cf:[function(){return Promise.all([n.e(532),n.e(4563)]).then(n.bind(n,4816))},"@site/versioned_docs/version-7.0.0/guides/customizing.md",4816],bbfb0947:[function(){return Promise.all([n.e(532),n.e(7603)]).then(n.bind(n,4144))},"@site/versioned_docs/version-7.0.0/guides/getting-started.md",4144],bdb71c26:[function(){return n.e(7226).then(n.bind(n,313))},"@site/versioned_docs/version-6.8.0/feature-schema-validation.md",313],be187cac:[function(){return n.e(3224).then(n.bind(n,596))},"@site/versioned_docs/version-6.14.0/migration-v5-to-v6.md",596],be21ce14:[function(){return n.e(3499).then(n.bind(n,3118))},"@site/versioned_docs/version-6.4.0/feature-wildcards.md",3118],be76f99b:[function(){return n.e(7371).then(n.bind(n,1758))},"@site/versioned_docs/version-6.10.0/feature-wildcards.md",1758],bec209e4:[function(){return n.e(8468).then(n.bind(n,2504))},"@site/versioned_docs/version-6.9.0/feature-error-messages.md",2504],bf1edca5:[function(){return n.e(1400).then(n.bind(n,7859))},"@site/versioned_docs/version-6.11.0/migration-v5-to-v6.md",7859],bf35a50a:[function(){return n.e(5938).then(n.bind(n,3202))},"@site/versioned_docs/version-6.6.0/feature-error-messages.md",3202],bfc3545d:[function(){return n.e(2252).then(n.bind(n,1631))},"@site/versioned_docs/version-6.1.0/feature-wildcards.md",1631],bfdce259:[function(){return n.e(668).then(n.bind(n,187))},"@site/versioned_docs/version-6.5.0/api-sanitization-chain.md",187],c0f3f8dd:[function(){return n.e(9507).then(n.bind(n,7598))},"@site/versioned_docs/version-6.13.0/api-check.md",7598],c228b49c:[function(){return n.e(9351).then(n.bind(n,8384))},"@site/versioned_docs/version-6.1.0/api-filter.md",8384],c32c8e15:[function(){return n.e(4585).then(n.bind(n,304))},"@site/versioned_docs/version-6.2.0/api-matched-data.md",304],c59e05db:[function(){return n.e(6129).then(n.bind(n,2562))},"@site/versioned_docs/version-7.0.0/api/misc.md",2562],c6c4033b:[function(){return n.e(1608).then(n.bind(n,1225))},"@site/versioned_docs/version-6.7.0/feature-schema-validation.md",1225],c8ebe515:[function(){return Promise.all([n.e(532),n.e(2330)]).then(n.bind(n,8328))},"@site/../docs/api/check-exact.md",8328],c9607746:[function(){return n.e(7709).then(n.bind(n,8990))},"@site/versioned_docs/version-6.1.0/api-validation-result.md",8990],ca77dae4:[function(){return n.e(5211).then(n.t.bind(n,8858,19))},"~docs/default/version-6-12-0-metadata-prop-0e8.json",8858],cb2c64da:[function(){return n.e(7700).then(n.bind(n,3339))},"@site/versioned_docs/version-6.12.0/migration-v5-to-v6.md",3339],cb59c4a0:[function(){return n.e(785).then(n.bind(n,1387))},"@site/versioned_docs/version-6.13.0/feature-schema-validation.md",1387],cdfbc197:[function(){return n.e(9188).then(n.bind(n,3739))},"@site/versioned_docs/version-6.4.0/api-check.md",3739],cec11939:[function(){return n.e(9124).then(n.bind(n,4743))},"@site/versioned_docs/version-5.2.0/api-legacy.md",4743],cf3e925d:[function(){return n.e(7786).then(n.bind(n,714))},"@site/versioned_docs/version-6.10.0/feature-schema-validation.md",714],d2466f6f:[function(){return n.e(49).then(n.bind(n,1145))},"@site/versioned_docs/version-5.3.0/api-validation-result.md",1145],d30eb9d5:[function(){return n.e(5257).then(n.bind(n,7354))},"@site/versioned_docs/version-6.6.0/api-sanitization-chain.md",7354],d3874e59:[function(){return n.e(6374).then(n.bind(n,2621))},"@site/pages/index.js",2621],d48f303d:[function(){return n.e(4148).then(n.t.bind(n,2247,19))},"~docs/default/version-5-2-0-metadata-prop-707.json",2247],d4b00c8e:[function(){return n.e(888).then(n.t.bind(n,5082,19))},"~docs/default/version-6-7-0-metadata-prop-bd5.json",5082],d720a69e:[function(){return n.e(8360).then(n.bind(n,9301))},"@site/versioned_docs/version-6.8.0/api-check.md",9301],d7a0e816:[function(){return n.e(7640).then(n.bind(n,4536))},"@site/versioned_docs/version-6.4.0/api-matched-data.md",4536],d7b686af:[function(){return n.e(8568).then(n.bind(n,8141))},"@site/versioned_docs/version-6.3.0/feature-error-messages.md",8141],d8146d88:[function(){return n.e(1894).then(n.bind(n,6339))},"@site/versioned_docs/version-6.11.0/feature-error-messages.md",6339],d8a3c4e8:[function(){return n.e(9553).then(n.bind(n,6969))},"@site/versioned_docs/version-7.0.0/migration-v5-to-v6.md",6969],d96b90b7:[function(){return n.e(4295).then(n.bind(n,9197))},"@site/versioned_docs/version-5.2.0/feature-custom-validators-sanitizers.md",9197],d9a94183:[function(){return n.e(4873).then(n.bind(n,3087))},"@site/versioned_docs/version-6.12.0/feature-schema-validation.md",3087],da63d163:[function(){return n.e(2413).then(n.t.bind(n,7085,19))},"/Users/gustavohenke/Projects/express-validator/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7085],daaec077:[function(){return Promise.all([n.e(532),n.e(8669)]).then(n.bind(n,9658))},"@site/../docs/guides/manually-running.md",9658],dafd2d45:[function(){return n.e(823).then(n.bind(n,2376))},"@site/versioned_docs/version-6.5.0/index.md",2376],dc82b870:[function(){return Promise.all([n.e(532),n.e(5160)]).then(n.bind(n,367))},"@site/versioned_docs/version-6.10.0/api-validation-result.md",367],dcc0022e:[function(){return n.e(7998).then(n.bind(n,4092))},"@site/versioned_docs/version-5.3.0/index.md",4092],de021951:[function(){return Promise.all([n.e(532),n.e(6397)]).then(n.bind(n,1779))},"@site/../docs/api/validation-result.md",1779],dea898c0:[function(){return n.e(8128).then(n.bind(n,760))},"@site/versioned_docs/version-6.12.0/api-filter.md",760],df70af35:[function(){return n.e(4727).then(n.bind(n,5022))},"@site/../docs/guides/validation-chain.md",5022],e00e9744:[function(){return n.e(4163).then(n.bind(n,6547))},"@site/versioned_docs/version-6.10.0/faq.md",6547],e096712b:[function(){return n.e(5752).then(n.bind(n,9741))},"@site/versioned_docs/version-6.10.0/feature-error-messages.md",9741],e16cd061:[function(){return n.e(1120).then(n.bind(n,1781))},"@site/versioned_docs/version-6.14.0/feature-whole-body-validation.md",1781],e2ce234d:[function(){return n.e(2474).then(n.t.bind(n,7647,19))},"~docs/default/category-docsnext-docs-category-express-validator-guides-4a7.json",7647],e3068001:[function(){return n.e(283).then(n.bind(n,5016))},"@site/versioned_docs/version-6.1.0/api-matched-data.md",5016],e40fdf3e:[function(){return n.e(6668).then(n.bind(n,1423))},"@site/versioned_docs/version-5.2.0/feature-error-messages.md",1423],e4522466:[function(){return n.e(8460).then(n.bind(n,6359))},"@site/versioned_docs/version-6.15.0/api-matched-data.md",6359],e576ad5a:[function(){return n.e(1594).then(n.bind(n,2114))},"@site/versioned_docs/version-6.8.0/feature-wildcards.md",2114],e601491c:[function(){return n.e(4804).then(n.bind(n,2948))},"@site/versioned_docs/version-6.3.0/feature-custom-validators-sanitizers.md",2948],e6b28b9a:[function(){return n.e(9826).then(n.bind(n,2689))},"@site/versioned_docs/version-6.7.0/api-matched-data.md",2689],e6d95f92:[function(){return n.e(7548).then(n.t.bind(n,6487,19))},"~docs/default/version-5-3-0-metadata-prop-d54.json",6487],e7296c31:[function(){return n.e(8651).then(n.bind(n,4175))},"@site/versioned_docs/version-6.15.0/migration-v5-to-v6.md",4175],e7b1c7fb:[function(){return n.e(3514).then(n.bind(n,1142))},"@site/versioned_docs/version-6.0.0/api-validation-chain.md",1142],e819c839:[function(){return n.e(9964).then(n.bind(n,7095))},"@site/versioned_docs/version-6.7.0/api-filter.md",7095],e8d874da:[function(){return n.e(4223).then(n.bind(n,5360))},"@site/versioned_docs/version-6.9.0/api-filter.md",5360],e8eb75b8:[function(){return n.e(8551).then(n.bind(n,1073))},"@site/../docs/guides/field-selection.md",1073],e90bd361:[function(){return n.e(402).then(n.bind(n,658))},"@site/versioned_docs/version-6.6.0/feature-custom-validators-sanitizers.md",658],ea4e3d0a:[function(){return n.e(103).then(n.bind(n,2846))},"@site/versioned_docs/version-6.10.0/api-sanitization-chain.md",2846],eb21ac32:[function(){return n.e(9612).then(n.t.bind(n,7456,19))},"~docs/default/version-6-1-0-metadata-prop-a48.json",7456],ec3aa2a7:[function(){return n.e(8890).then(n.bind(n,2493))},"@site/versioned_docs/version-6.9.0/feature-custom-validators-sanitizers.md",2493],ed6862e8:[function(){return n.e(2365).then(n.bind(n,2977))},"@site/versioned_docs/version-6.1.0/feature-schema-validation.md",2977],ed701caf:[function(){return Promise.all([n.e(532),n.e(7566)]).then(n.bind(n,4532))},"@site/versioned_docs/version-6.11.0/api-validation-result.md",4532],eefaeb96:[function(){return n.e(6847).then(n.bind(n,781))},"@site/versioned_docs/version-6.8.0/feature-running-imperatively.md",781],f0627f31:[function(){return n.e(2625).then(n.bind(n,5053))},"@site/versioned_docs/version-5.2.0/api-validation-result.md",5053],f0db630e:[function(){return n.e(844).then(n.bind(n,2180))},"@site/versioned_docs/version-6.13.0/feature-wildcards.md",2180],f0dd6a1c:[function(){return n.e(1185).then(n.bind(n,2645))},"@site/../docs/api/validation-chain.md",2645],f0e54ba1:[function(){return n.e(4805).then(n.bind(n,2748))},"@site/versioned_docs/version-6.3.0/feature-running-imperatively.md",2748],f271fbd1:[function(){return n.e(5987).then(n.bind(n,119))},"@site/versioned_docs/version-6.2.0/api-sanitization-chain.md",119],f2b9d9a0:[function(){return n.e(9681).then(n.bind(n,5287))},"@site/versioned_docs/version-6.5.0/feature-wildcards.md",5287],f2ed1a45:[function(){return n.e(1e3).then(n.bind(n,8787))},"@site/versioned_docs/version-5.2.0/api-validation-chain.md",8787],f2fce86e:[function(){return n.e(3402).then(n.bind(n,6981))},"@site/versioned_docs/version-6.13.0/api-matched-data.md",6981],f424d1a5:[function(){return n.e(576).then(n.t.bind(n,8514,19))},"~docs/default/version-6-0-0-metadata-prop-260.json",8514],f53fc191:[function(){return Promise.all([n.e(532),n.e(3065)]).then(n.bind(n,4177))},"@site/versioned_docs/version-6.14.0/api-validation-result.mdx",4177],f5707f2d:[function(){return n.e(9677).then(n.bind(n,242))},"@site/versioned_docs/version-6.1.0/api-sanitization-chain.md",242],f5b0ea4e:[function(){return Promise.all([n.e(532),n.e(5719)]).then(n.bind(n,6962))},"@site/versioned_docs/version-6.12.0/feature-custom-validators-sanitizers.md",6962],f6e3ec6f:[function(){return n.e(2371).then(n.bind(n,731))},"@site/versioned_docs/version-6.10.0/feature-whole-body-validation.md",731],f851cefd:[function(){return n.e(2685).then(n.bind(n,5465))},"@site/versioned_docs/version-6.2.0/feature-whole-body-validation.md",5465],f85307a1:[function(){return n.e(4682).then(n.bind(n,7497))},"@site/versioned_docs/version-6.8.0/index.md",7497],f8f2717e:[function(){return n.e(6460).then(n.bind(n,1445))},"@site/versioned_docs/version-6.3.0/feature-schema-validation.md",1445],f9296bce:[function(){return Promise.all([n.e(532),n.e(2818)]).then(n.bind(n,4083))},"@site/versioned_docs/version-6.11.0/feature-running-imperatively.md",4083],f9670de5:[function(){return n.e(1472).then(n.bind(n,9380))},"@site/versioned_docs/version-6.6.0/feature-schema-validation.md",9380],f9d96800:[function(){return n.e(1662).then(n.bind(n,4559))},"@site/versioned_docs/version-6.3.0/api-validation-result.md",4559],fb281095:[function(){return n.e(2886).then(n.bind(n,7628))},"@site/versioned_docs/version-6.12.0/faq.md",7628],fb56a3bd:[function(){return n.e(4673).then(n.bind(n,3558))},"@site/versioned_docs/version-5.2.0/feature-sanitization.md",3558],fc25dd3d:[function(){return n.e(7716).then(n.bind(n,5141))},"@site/versioned_docs/version-6.0.0/api-filter.md",5141],ff72b8c5:[function(){return n.e(3024).then(n.bind(n,1451))},"@site/versioned_docs/version-6.3.0/api-sanitization-chain.md",1451]};function l(e){var t=e.error,n=e.retry,i=e.pastDelay;return t?a.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},a.createElement("p",null,String(t)),a.createElement("div",null,a.createElement("button",{type:"button",onClick:n},"Retry"))):i?a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},a.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},a.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},a.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},a.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),a.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),a.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),a.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},a.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),a.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),a.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),a.createElement("circle",{cx:"22",cy:"22",r:"8"},a.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var d=n(3361),u=n(6881);function p(e,t){if("*"===e)return o()({loading:l,loader:function(){return n.e(3893).then(n.bind(n,3893))},modules:["@theme/NotFound"],webpack:function(){return[3893]},render:function(e,t){var n=e.default;return a.createElement(u.z,{value:{plugin:{name:"native",id:"default"}}},a.createElement(n,t))}});var r=s[e+"-"+t],p={},f=[],m=[],h=(0,d.Z)(r);return Object.entries(h).forEach((function(e){var t=e[0],n=e[1],a=c[n];a&&(p[t]=a[0],f.push(a[1]),m.push(a[2]))})),o().Map({loading:l,loader:p,modules:f,webpack:function(){return m},render:function(t,n){var o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((function(t){var n=t[0],a=t[1],i=a.default;if(!i)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof i&&"function"!=typeof i||Object.keys(a).filter((function(e){return"default"!==e})).forEach((function(e){i[e]=a[e]}));var r=o,s=n.split(".");s.slice(0,-1).forEach((function(e){r=r[e]})),r[s[s.length-1]]=i}));var s=o.__comp;delete o.__comp;var c=o.__context;return delete o.__context,a.createElement(u.z,{value:c},a.createElement(s,(0,i.Z)({},o,n)))}})}const f=[{path:"/search",component:p("/search","37a"),exact:!0},{path:"/docs/5.2.0",component:p("/docs/5.2.0","7cb"),routes:[{path:"/docs/5.2.0/",component:p("/docs/5.2.0/","1ce"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/check-api",component:p("/docs/5.2.0/check-api","9f9"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/custom-error-messages",component:p("/docs/5.2.0/custom-error-messages","9f7"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/custom-validators-sanitizers",component:p("/docs/5.2.0/custom-validators-sanitizers","9e4"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/filter-api",component:p("/docs/5.2.0/filter-api","eac"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/legacy-api",component:p("/docs/5.2.0/legacy-api","ad7"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/sanitization",component:p("/docs/5.2.0/sanitization","3f7"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/sanitization-chain-api",component:p("/docs/5.2.0/sanitization-chain-api","614"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/schema-validation",component:p("/docs/5.2.0/schema-validation","bc5"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/validation-chain-api",component:p("/docs/5.2.0/validation-chain-api","3d4"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/validation-result-api",component:p("/docs/5.2.0/validation-result-api","808"),exact:!0,sidebar:"api"},{path:"/docs/5.2.0/whole-body-validation",component:p("/docs/5.2.0/whole-body-validation","065"),exact:!0,sidebar:"version-5.2.0/docs"},{path:"/docs/5.2.0/wildcards",component:p("/docs/5.2.0/wildcards","2ce"),exact:!0,sidebar:"version-5.2.0/docs"}]},{path:"/docs/5.3.0",component:p("/docs/5.3.0","b5b"),routes:[{path:"/docs/5.3.0/",component:p("/docs/5.3.0/","6ca"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/check-api",component:p("/docs/5.3.0/check-api","bfd"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/custom-error-messages",component:p("/docs/5.3.0/custom-error-messages","622"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/custom-validators-sanitizers",component:p("/docs/5.3.0/custom-validators-sanitizers","4a4"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/filter-api",component:p("/docs/5.3.0/filter-api","8fb"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/legacy-api",component:p("/docs/5.3.0/legacy-api","e94"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/sanitization",component:p("/docs/5.3.0/sanitization","baa"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/sanitization-chain-api",component:p("/docs/5.3.0/sanitization-chain-api","bcd"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/schema-validation",component:p("/docs/5.3.0/schema-validation","803"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/validation-chain-api",component:p("/docs/5.3.0/validation-chain-api","2c7"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/validation-result-api",component:p("/docs/5.3.0/validation-result-api","32f"),exact:!0,sidebar:"api"},{path:"/docs/5.3.0/whole-body-validation",component:p("/docs/5.3.0/whole-body-validation","121"),exact:!0,sidebar:"version-5.3.0/docs"},{path:"/docs/5.3.0/wildcards",component:p("/docs/5.3.0/wildcards","18c"),exact:!0,sidebar:"version-5.3.0/docs"}]},{path:"/docs/6.0.0",component:p("/docs/6.0.0","4f2"),routes:[{path:"/docs/6.0.0/",component:p("/docs/6.0.0/","1d1"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/check-api",component:p("/docs/6.0.0/check-api","e6f"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/custom-error-messages",component:p("/docs/6.0.0/custom-error-messages","cc1"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/custom-validators-sanitizers",component:p("/docs/6.0.0/custom-validators-sanitizers","0e6"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/filter-api",component:p("/docs/6.0.0/filter-api","efe"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/matched-data-api",component:p("/docs/6.0.0/matched-data-api","204"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/running-imperatively",component:p("/docs/6.0.0/running-imperatively","13e"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/sanitization",component:p("/docs/6.0.0/sanitization","ae3"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/sanitization-chain-api",component:p("/docs/6.0.0/sanitization-chain-api","87e"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/schema-validation",component:p("/docs/6.0.0/schema-validation","c03"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/validation-chain-api",component:p("/docs/6.0.0/validation-chain-api","56d"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/validation-result-api",component:p("/docs/6.0.0/validation-result-api","684"),exact:!0,sidebar:"api"},{path:"/docs/6.0.0/whole-body-validation",component:p("/docs/6.0.0/whole-body-validation","ab2"),exact:!0,sidebar:"version-6.0.0/docs"},{path:"/docs/6.0.0/wildcards",component:p("/docs/6.0.0/wildcards","118"),exact:!0,sidebar:"version-6.0.0/docs"}]},{path:"/docs/6.1.0",component:p("/docs/6.1.0","147"),routes:[{path:"/docs/6.1.0/",component:p("/docs/6.1.0/","f77"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/check-api",component:p("/docs/6.1.0/check-api","2b7"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/custom-error-messages",component:p("/docs/6.1.0/custom-error-messages","13b"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/custom-validators-sanitizers",component:p("/docs/6.1.0/custom-validators-sanitizers","942"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/filter-api",component:p("/docs/6.1.0/filter-api","228"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/matched-data-api",component:p("/docs/6.1.0/matched-data-api","f1c"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/running-imperatively",component:p("/docs/6.1.0/running-imperatively","e17"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/sanitization",component:p("/docs/6.1.0/sanitization","dd2"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/sanitization-chain-api",component:p("/docs/6.1.0/sanitization-chain-api","a58"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/schema-validation",component:p("/docs/6.1.0/schema-validation","7b5"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/validation-chain-api",component:p("/docs/6.1.0/validation-chain-api","957"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/validation-result-api",component:p("/docs/6.1.0/validation-result-api","92d"),exact:!0,sidebar:"api"},{path:"/docs/6.1.0/whole-body-validation",component:p("/docs/6.1.0/whole-body-validation","ad3"),exact:!0,sidebar:"version-6.1.0/docs"},{path:"/docs/6.1.0/wildcards",component:p("/docs/6.1.0/wildcards","a3d"),exact:!0,sidebar:"version-6.1.0/docs"}]},{path:"/docs/6.10.0",component:p("/docs/6.10.0","dfd"),routes:[{path:"/docs/6.10.0/",component:p("/docs/6.10.0/","158"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/check-api",component:p("/docs/6.10.0/check-api","ee9"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/custom-error-messages",component:p("/docs/6.10.0/custom-error-messages","d76"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/custom-validators-sanitizers",component:p("/docs/6.10.0/custom-validators-sanitizers","94b"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/faq",component:p("/docs/6.10.0/faq","70a"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/filter-api",component:p("/docs/6.10.0/filter-api","761"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/matched-data-api",component:p("/docs/6.10.0/matched-data-api","bbf"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/migration-v5-to-v6",component:p("/docs/6.10.0/migration-v5-to-v6","66b"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/running-imperatively",component:p("/docs/6.10.0/running-imperatively","d01"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/sanitization",component:p("/docs/6.10.0/sanitization","48b"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/sanitization-chain-api",component:p("/docs/6.10.0/sanitization-chain-api","2fb"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/schema-validation",component:p("/docs/6.10.0/schema-validation","f27"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/validation-chain-api",component:p("/docs/6.10.0/validation-chain-api","62a"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/validation-result-api",component:p("/docs/6.10.0/validation-result-api","9b8"),exact:!0,sidebar:"api"},{path:"/docs/6.10.0/whole-body-validation",component:p("/docs/6.10.0/whole-body-validation","9b1"),exact:!0,sidebar:"version-6.10.0/docs"},{path:"/docs/6.10.0/wildcards",component:p("/docs/6.10.0/wildcards","ca0"),exact:!0,sidebar:"version-6.10.0/docs"}]},{path:"/docs/6.11.0",component:p("/docs/6.11.0","4ce"),routes:[{path:"/docs/6.11.0/",component:p("/docs/6.11.0/","fc5"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/check-api",component:p("/docs/6.11.0/check-api","c44"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/custom-error-messages",component:p("/docs/6.11.0/custom-error-messages","5e7"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/custom-validators-sanitizers",component:p("/docs/6.11.0/custom-validators-sanitizers","f07"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/faq",component:p("/docs/6.11.0/faq","fcf"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/filter-api",component:p("/docs/6.11.0/filter-api","fe5"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/matched-data-api",component:p("/docs/6.11.0/matched-data-api","375"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/migration-v5-to-v6",component:p("/docs/6.11.0/migration-v5-to-v6","385"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/running-imperatively",component:p("/docs/6.11.0/running-imperatively","5a2"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/sanitization",component:p("/docs/6.11.0/sanitization","ac5"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/sanitization-chain-api",component:p("/docs/6.11.0/sanitization-chain-api","3cd"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/schema-validation",component:p("/docs/6.11.0/schema-validation","2bb"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/validation-chain-api",component:p("/docs/6.11.0/validation-chain-api","a15"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/validation-result-api",component:p("/docs/6.11.0/validation-result-api","520"),exact:!0,sidebar:"api"},{path:"/docs/6.11.0/whole-body-validation",component:p("/docs/6.11.0/whole-body-validation","a46"),exact:!0,sidebar:"version-6.11.0/docs"},{path:"/docs/6.11.0/wildcards",component:p("/docs/6.11.0/wildcards","f4a"),exact:!0,sidebar:"version-6.11.0/docs"}]},{path:"/docs/6.12.0",component:p("/docs/6.12.0","26f"),routes:[{path:"/docs/6.12.0/",component:p("/docs/6.12.0/","b5a"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/check-api",component:p("/docs/6.12.0/check-api","fa5"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/custom-error-messages",component:p("/docs/6.12.0/custom-error-messages","781"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/custom-validators-sanitizers",component:p("/docs/6.12.0/custom-validators-sanitizers","568"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/faq",component:p("/docs/6.12.0/faq","f56"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/filter-api",component:p("/docs/6.12.0/filter-api","783"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/matched-data-api",component:p("/docs/6.12.0/matched-data-api","05d"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/migration-v5-to-v6",component:p("/docs/6.12.0/migration-v5-to-v6","8b2"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/running-imperatively",component:p("/docs/6.12.0/running-imperatively","ed1"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/sanitization",component:p("/docs/6.12.0/sanitization","d99"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/sanitization-chain-api",component:p("/docs/6.12.0/sanitization-chain-api","7d3"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/schema-validation",component:p("/docs/6.12.0/schema-validation","a30"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/validation-chain-api",component:p("/docs/6.12.0/validation-chain-api","da1"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/validation-result-api",component:p("/docs/6.12.0/validation-result-api","37a"),exact:!0,sidebar:"api"},{path:"/docs/6.12.0/whole-body-validation",component:p("/docs/6.12.0/whole-body-validation","613"),exact:!0,sidebar:"version-6.12.0/docs"},{path:"/docs/6.12.0/wildcards",component:p("/docs/6.12.0/wildcards","f4e"),exact:!0,sidebar:"version-6.12.0/docs"}]},{path:"/docs/6.13.0",component:p("/docs/6.13.0","94f"),routes:[{path:"/docs/6.13.0/",component:p("/docs/6.13.0/","8e6"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/check-api",component:p("/docs/6.13.0/check-api","ca6"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/custom-error-messages",component:p("/docs/6.13.0/custom-error-messages","9a1"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/custom-validators-sanitizers",component:p("/docs/6.13.0/custom-validators-sanitizers","c66"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/faq",component:p("/docs/6.13.0/faq","8d0"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/filter-api",component:p("/docs/6.13.0/filter-api","ac7"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/matched-data-api",component:p("/docs/6.13.0/matched-data-api","186"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/migration-v5-to-v6",component:p("/docs/6.13.0/migration-v5-to-v6","43a"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/running-imperatively",component:p("/docs/6.13.0/running-imperatively","5b2"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/sanitization",component:p("/docs/6.13.0/sanitization","059"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/sanitization-chain-api",component:p("/docs/6.13.0/sanitization-chain-api","687"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/schema-validation",component:p("/docs/6.13.0/schema-validation","d31"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/validation-chain-api",component:p("/docs/6.13.0/validation-chain-api","0e1"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/validation-result-api",component:p("/docs/6.13.0/validation-result-api","fce"),exact:!0,sidebar:"api"},{path:"/docs/6.13.0/whole-body-validation",component:p("/docs/6.13.0/whole-body-validation","0e7"),exact:!0,sidebar:"version-6.13.0/docs"},{path:"/docs/6.13.0/wildcards",component:p("/docs/6.13.0/wildcards","fe5"),exact:!0,sidebar:"version-6.13.0/docs"}]},{path:"/docs/6.14.0",component:p("/docs/6.14.0","7f3"),routes:[{path:"/docs/6.14.0/",component:p("/docs/6.14.0/","426"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/check-api",component:p("/docs/6.14.0/check-api","13c"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/custom-error-messages",component:p("/docs/6.14.0/custom-error-messages","c4c"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/custom-validators-sanitizers",component:p("/docs/6.14.0/custom-validators-sanitizers","273"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/faq",component:p("/docs/6.14.0/faq","2f4"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/filter-api",component:p("/docs/6.14.0/filter-api","a11"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/matched-data-api",component:p("/docs/6.14.0/matched-data-api","f22"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/migration-v5-to-v6",component:p("/docs/6.14.0/migration-v5-to-v6","824"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/running-imperatively",component:p("/docs/6.14.0/running-imperatively","875"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/sanitization",component:p("/docs/6.14.0/sanitization","c1b"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/sanitization-chain-api",component:p("/docs/6.14.0/sanitization-chain-api","488"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/schema-validation",component:p("/docs/6.14.0/schema-validation","4b8"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/validation-chain-api",component:p("/docs/6.14.0/validation-chain-api","a0e"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/validation-result-api",component:p("/docs/6.14.0/validation-result-api","aad"),exact:!0,sidebar:"api"},{path:"/docs/6.14.0/whole-body-validation",component:p("/docs/6.14.0/whole-body-validation","553"),exact:!0,sidebar:"version-6.14.0/docs"},{path:"/docs/6.14.0/wildcards",component:p("/docs/6.14.0/wildcards","90f"),exact:!0,sidebar:"version-6.14.0/docs"}]},{path:"/docs/6.15.0",component:p("/docs/6.15.0","d98"),routes:[{path:"/docs/6.15.0/",component:p("/docs/6.15.0/","1c3"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/check-api",component:p("/docs/6.15.0/check-api","825"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/custom-error-messages",component:p("/docs/6.15.0/custom-error-messages","19a"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/custom-validators-sanitizers",component:p("/docs/6.15.0/custom-validators-sanitizers","52c"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/faq",component:p("/docs/6.15.0/faq","44b"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/filter-api",component:p("/docs/6.15.0/filter-api","eb6"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/matched-data-api",component:p("/docs/6.15.0/matched-data-api","4bc"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/migration-v5-to-v6",component:p("/docs/6.15.0/migration-v5-to-v6","0b8"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/running-imperatively",component:p("/docs/6.15.0/running-imperatively","957"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/sanitization",component:p("/docs/6.15.0/sanitization","e40"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/sanitization-chain-api",component:p("/docs/6.15.0/sanitization-chain-api","463"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/schema-validation",component:p("/docs/6.15.0/schema-validation","4e4"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/validation-chain-api",component:p("/docs/6.15.0/validation-chain-api","1de"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/validation-result-api",component:p("/docs/6.15.0/validation-result-api","cd4"),exact:!0,sidebar:"api"},{path:"/docs/6.15.0/whole-body-validation",component:p("/docs/6.15.0/whole-body-validation","c65"),exact:!0,sidebar:"docs"},{path:"/docs/6.15.0/wildcards",component:p("/docs/6.15.0/wildcards","056"),exact:!0,sidebar:"docs"}]},{path:"/docs/6.2.0",component:p("/docs/6.2.0","3dc"),routes:[{path:"/docs/6.2.0/",component:p("/docs/6.2.0/","e61"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/check-api",component:p("/docs/6.2.0/check-api","051"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/custom-error-messages",component:p("/docs/6.2.0/custom-error-messages","fcb"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/custom-validators-sanitizers",component:p("/docs/6.2.0/custom-validators-sanitizers","4f7"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/filter-api",component:p("/docs/6.2.0/filter-api","0b6"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/matched-data-api",component:p("/docs/6.2.0/matched-data-api","8eb"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/running-imperatively",component:p("/docs/6.2.0/running-imperatively","106"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/sanitization",component:p("/docs/6.2.0/sanitization","469"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/sanitization-chain-api",component:p("/docs/6.2.0/sanitization-chain-api","da3"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/schema-validation",component:p("/docs/6.2.0/schema-validation","d99"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/validation-chain-api",component:p("/docs/6.2.0/validation-chain-api","950"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/validation-result-api",component:p("/docs/6.2.0/validation-result-api","516"),exact:!0,sidebar:"api"},{path:"/docs/6.2.0/whole-body-validation",component:p("/docs/6.2.0/whole-body-validation","14b"),exact:!0,sidebar:"version-6.2.0/docs"},{path:"/docs/6.2.0/wildcards",component:p("/docs/6.2.0/wildcards","d64"),exact:!0,sidebar:"version-6.2.0/docs"}]},{path:"/docs/6.3.0",component:p("/docs/6.3.0","cbb"),routes:[{path:"/docs/6.3.0/",component:p("/docs/6.3.0/","940"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/check-api",component:p("/docs/6.3.0/check-api","fec"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/custom-error-messages",component:p("/docs/6.3.0/custom-error-messages","d71"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/custom-validators-sanitizers",component:p("/docs/6.3.0/custom-validators-sanitizers","ffc"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/filter-api",component:p("/docs/6.3.0/filter-api","758"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/matched-data-api",component:p("/docs/6.3.0/matched-data-api","324"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/running-imperatively",component:p("/docs/6.3.0/running-imperatively","4c0"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/sanitization",component:p("/docs/6.3.0/sanitization","3ce"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/sanitization-chain-api",component:p("/docs/6.3.0/sanitization-chain-api","4d4"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/schema-validation",component:p("/docs/6.3.0/schema-validation","eb6"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/validation-chain-api",component:p("/docs/6.3.0/validation-chain-api","835"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/validation-result-api",component:p("/docs/6.3.0/validation-result-api","6c9"),exact:!0,sidebar:"api"},{path:"/docs/6.3.0/whole-body-validation",component:p("/docs/6.3.0/whole-body-validation","2a3"),exact:!0,sidebar:"version-6.3.0/docs"},{path:"/docs/6.3.0/wildcards",component:p("/docs/6.3.0/wildcards","0be"),exact:!0,sidebar:"version-6.3.0/docs"}]},{path:"/docs/6.4.0",component:p("/docs/6.4.0","cbe"),routes:[{path:"/docs/6.4.0/",component:p("/docs/6.4.0/","704"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/check-api",component:p("/docs/6.4.0/check-api","6bc"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/custom-error-messages",component:p("/docs/6.4.0/custom-error-messages","128"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/custom-validators-sanitizers",component:p("/docs/6.4.0/custom-validators-sanitizers","865"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/filter-api",component:p("/docs/6.4.0/filter-api","8ee"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/matched-data-api",component:p("/docs/6.4.0/matched-data-api","5ba"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/running-imperatively",component:p("/docs/6.4.0/running-imperatively","994"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/sanitization",component:p("/docs/6.4.0/sanitization","217"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/sanitization-chain-api",component:p("/docs/6.4.0/sanitization-chain-api","c84"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/schema-validation",component:p("/docs/6.4.0/schema-validation","f31"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/validation-chain-api",component:p("/docs/6.4.0/validation-chain-api","1fc"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/validation-result-api",component:p("/docs/6.4.0/validation-result-api","8e6"),exact:!0,sidebar:"api"},{path:"/docs/6.4.0/whole-body-validation",component:p("/docs/6.4.0/whole-body-validation","7e6"),exact:!0,sidebar:"version-6.4.0/docs"},{path:"/docs/6.4.0/wildcards",component:p("/docs/6.4.0/wildcards","979"),exact:!0,sidebar:"version-6.4.0/docs"}]},{path:"/docs/6.5.0",component:p("/docs/6.5.0","788"),routes:[{path:"/docs/6.5.0/",component:p("/docs/6.5.0/","3be"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/check-api",component:p("/docs/6.5.0/check-api","49b"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/custom-error-messages",component:p("/docs/6.5.0/custom-error-messages","965"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/custom-validators-sanitizers",component:p("/docs/6.5.0/custom-validators-sanitizers","32a"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/filter-api",component:p("/docs/6.5.0/filter-api","5da"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/matched-data-api",component:p("/docs/6.5.0/matched-data-api","7b2"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/running-imperatively",component:p("/docs/6.5.0/running-imperatively","922"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/sanitization",component:p("/docs/6.5.0/sanitization","662"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/sanitization-chain-api",component:p("/docs/6.5.0/sanitization-chain-api","497"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/schema-validation",component:p("/docs/6.5.0/schema-validation","fa8"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/validation-chain-api",component:p("/docs/6.5.0/validation-chain-api","9d4"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/validation-result-api",component:p("/docs/6.5.0/validation-result-api","904"),exact:!0,sidebar:"api"},{path:"/docs/6.5.0/whole-body-validation",component:p("/docs/6.5.0/whole-body-validation","878"),exact:!0,sidebar:"version-6.5.0/docs"},{path:"/docs/6.5.0/wildcards",component:p("/docs/6.5.0/wildcards","882"),exact:!0,sidebar:"version-6.5.0/docs"}]},{path:"/docs/6.6.0",component:p("/docs/6.6.0","42d"),routes:[{path:"/docs/6.6.0/",component:p("/docs/6.6.0/","bea"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/check-api",component:p("/docs/6.6.0/check-api","c2b"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/custom-error-messages",component:p("/docs/6.6.0/custom-error-messages","684"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/custom-validators-sanitizers",component:p("/docs/6.6.0/custom-validators-sanitizers","b9d"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/filter-api",component:p("/docs/6.6.0/filter-api","f81"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/matched-data-api",component:p("/docs/6.6.0/matched-data-api","046"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/running-imperatively",component:p("/docs/6.6.0/running-imperatively","a1e"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/sanitization",component:p("/docs/6.6.0/sanitization","f0a"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/sanitization-chain-api",component:p("/docs/6.6.0/sanitization-chain-api","d42"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/schema-validation",component:p("/docs/6.6.0/schema-validation","997"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/validation-chain-api",component:p("/docs/6.6.0/validation-chain-api","5ca"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/validation-result-api",component:p("/docs/6.6.0/validation-result-api","a08"),exact:!0,sidebar:"api"},{path:"/docs/6.6.0/whole-body-validation",component:p("/docs/6.6.0/whole-body-validation","ccb"),exact:!0,sidebar:"version-6.6.0/docs"},{path:"/docs/6.6.0/wildcards",component:p("/docs/6.6.0/wildcards","f76"),exact:!0,sidebar:"version-6.6.0/docs"}]},{path:"/docs/6.7.0",component:p("/docs/6.7.0","ca2"),routes:[{path:"/docs/6.7.0/",component:p("/docs/6.7.0/","d50"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/check-api",component:p("/docs/6.7.0/check-api","33d"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/custom-error-messages",component:p("/docs/6.7.0/custom-error-messages","8bb"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/custom-validators-sanitizers",component:p("/docs/6.7.0/custom-validators-sanitizers","2df"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/filter-api",component:p("/docs/6.7.0/filter-api","8b6"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/matched-data-api",component:p("/docs/6.7.0/matched-data-api","81b"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/running-imperatively",component:p("/docs/6.7.0/running-imperatively","a2e"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/sanitization",component:p("/docs/6.7.0/sanitization","fd0"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/sanitization-chain-api",component:p("/docs/6.7.0/sanitization-chain-api","018"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/schema-validation",component:p("/docs/6.7.0/schema-validation","d86"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/validation-chain-api",component:p("/docs/6.7.0/validation-chain-api","0ae"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/validation-result-api",component:p("/docs/6.7.0/validation-result-api","0d1"),exact:!0,sidebar:"api"},{path:"/docs/6.7.0/whole-body-validation",component:p("/docs/6.7.0/whole-body-validation","c78"),exact:!0,sidebar:"version-6.7.0/docs"},{path:"/docs/6.7.0/wildcards",component:p("/docs/6.7.0/wildcards","815"),exact:!0,sidebar:"version-6.7.0/docs"}]},{path:"/docs/6.8.0",component:p("/docs/6.8.0","91d"),routes:[{path:"/docs/6.8.0/",component:p("/docs/6.8.0/","5f4"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/check-api",component:p("/docs/6.8.0/check-api","7d6"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/custom-error-messages",component:p("/docs/6.8.0/custom-error-messages","99f"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/custom-validators-sanitizers",component:p("/docs/6.8.0/custom-validators-sanitizers","d99"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/filter-api",component:p("/docs/6.8.0/filter-api","e2a"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/matched-data-api",component:p("/docs/6.8.0/matched-data-api","170"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/running-imperatively",component:p("/docs/6.8.0/running-imperatively","87a"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/sanitization",component:p("/docs/6.8.0/sanitization","aaf"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/sanitization-chain-api",component:p("/docs/6.8.0/sanitization-chain-api","db9"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/schema-validation",component:p("/docs/6.8.0/schema-validation","996"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/validation-chain-api",component:p("/docs/6.8.0/validation-chain-api","ffe"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/validation-result-api",component:p("/docs/6.8.0/validation-result-api","de3"),exact:!0,sidebar:"api"},{path:"/docs/6.8.0/whole-body-validation",component:p("/docs/6.8.0/whole-body-validation","67d"),exact:!0,sidebar:"version-6.8.0/docs"},{path:"/docs/6.8.0/wildcards",component:p("/docs/6.8.0/wildcards","e2f"),exact:!0,sidebar:"version-6.8.0/docs"}]},{path:"/docs/6.9.0",component:p("/docs/6.9.0","80d"),routes:[{path:"/docs/6.9.0/",component:p("/docs/6.9.0/","fc2"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/check-api",component:p("/docs/6.9.0/check-api","c94"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/custom-error-messages",component:p("/docs/6.9.0/custom-error-messages","aeb"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/custom-validators-sanitizers",component:p("/docs/6.9.0/custom-validators-sanitizers","017"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/filter-api",component:p("/docs/6.9.0/filter-api","136"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/matched-data-api",component:p("/docs/6.9.0/matched-data-api","495"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/running-imperatively",component:p("/docs/6.9.0/running-imperatively","67e"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/sanitization",component:p("/docs/6.9.0/sanitization","878"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/sanitization-chain-api",component:p("/docs/6.9.0/sanitization-chain-api","8fa"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/schema-validation",component:p("/docs/6.9.0/schema-validation","05a"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/validation-chain-api",component:p("/docs/6.9.0/validation-chain-api","9bc"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/validation-result-api",component:p("/docs/6.9.0/validation-result-api","4ba"),exact:!0,sidebar:"api"},{path:"/docs/6.9.0/whole-body-validation",component:p("/docs/6.9.0/whole-body-validation","bf2"),exact:!0,sidebar:"version-6.9.0/docs"},{path:"/docs/6.9.0/wildcards",component:p("/docs/6.9.0/wildcards","275"),exact:!0,sidebar:"version-6.9.0/docs"}]},{path:"/docs/next",component:p("/docs/next","bd0"),routes:[{path:"/docs/next/",component:p("/docs/next/","7b2"),exact:!0,sidebar:"docs"},{path:"/docs/next/api/check",component:p("/docs/next/api/check","f10"),exact:!0,sidebar:"api"},{path:"/docs/next/api/check-exact",component:p("/docs/next/api/check-exact","dec"),exact:!0,sidebar:"api"},{path:"/docs/next/api/check-schema",component:p("/docs/next/api/check-schema","ea9"),exact:!0,sidebar:"api"},{path:"/docs/next/api/express-validator",component:p("/docs/next/api/express-validator","c02"),exact:!0,sidebar:"api"},{path:"/docs/next/api/matched-data",component:p("/docs/next/api/matched-data","5f4"),exact:!0,sidebar:"api"},{path:"/docs/next/api/misc",component:p("/docs/next/api/misc","0fb"),exact:!0,sidebar:"api"},{path:"/docs/next/api/one-of",component:p("/docs/next/api/one-of","6ee"),exact:!0,sidebar:"api"},{path:"/docs/next/api/validation-chain",component:p("/docs/next/api/validation-chain","1ba"),exact:!0,sidebar:"api"},{path:"/docs/next/api/validation-result",component:p("/docs/next/api/validation-result","369"),exact:!0,sidebar:"api"},{path:"/docs/next/architecture",component:p("/docs/next/architecture","1f5"),exact:!0},{path:"/docs/next/category/guides",component:p("/docs/next/category/guides","1a8"),exact:!0,sidebar:"docs"},{path:"/docs/next/category/migrating",component:p("/docs/next/category/migrating","e40"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/customizing",component:p("/docs/next/guides/customizing","e75"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/field-selection",component:p("/docs/next/guides/field-selection","82c"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/getting-started",component:p("/docs/next/guides/getting-started","588"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/manually-running",component:p("/docs/next/guides/manually-running","bda"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/schema-validation",component:p("/docs/next/guides/schema-validation","463"),exact:!0,sidebar:"docs"},{path:"/docs/next/guides/validation-chain",component:p("/docs/next/guides/validation-chain","959"),exact:!0,sidebar:"docs"},{path:"/docs/next/migration-v5-to-v6",component:p("/docs/next/migration-v5-to-v6","311"),exact:!0,sidebar:"docs"},{path:"/docs/next/migration-v6-to-v7",component:p("/docs/next/migration-v6-to-v7","fcd"),exact:!0,sidebar:"docs"}]},{path:"/docs",component:p("/docs","65d"),routes:[{path:"/docs/",component:p("/docs/","d32"),exact:!0,sidebar:"docs"},{path:"/docs/api/check",component:p("/docs/api/check","3c7"),exact:!0,sidebar:"api"},{path:"/docs/api/check-exact",component:p("/docs/api/check-exact","8ce"),exact:!0,sidebar:"api"},{path:"/docs/api/check-schema",component:p("/docs/api/check-schema","172"),exact:!0,sidebar:"api"},{path:"/docs/api/express-validator",component:p("/docs/api/express-validator","6ed"),exact:!0,sidebar:"api"},{path:"/docs/api/matched-data",component:p("/docs/api/matched-data","701"),exact:!0,sidebar:"api"},{path:"/docs/api/misc",component:p("/docs/api/misc","259"),exact:!0,sidebar:"api"},{path:"/docs/api/one-of",component:p("/docs/api/one-of","f6e"),exact:!0,sidebar:"api"},{path:"/docs/api/validation-chain",component:p("/docs/api/validation-chain","38c"),exact:!0,sidebar:"api"},{path:"/docs/api/validation-result",component:p("/docs/api/validation-result","ec8"),exact:!0,sidebar:"api"},{path:"/docs/architecture",component:p("/docs/architecture","404"),exact:!0},{path:"/docs/category/guides",component:p("/docs/category/guides","e10"),exact:!0,sidebar:"docs"},{path:"/docs/category/migrating",component:p("/docs/category/migrating","a99"),exact:!0,sidebar:"docs"},{path:"/docs/guides/customizing",component:p("/docs/guides/customizing","e13"),exact:!0,sidebar:"docs"},{path:"/docs/guides/field-selection",component:p("/docs/guides/field-selection","847"),exact:!0,sidebar:"docs"},{path:"/docs/guides/getting-started",component:p("/docs/guides/getting-started","efc"),exact:!0,sidebar:"docs"},{path:"/docs/guides/manually-running",component:p("/docs/guides/manually-running","928"),exact:!0,sidebar:"docs"},{path:"/docs/guides/schema-validation",component:p("/docs/guides/schema-validation","681"),exact:!0,sidebar:"docs"},{path:"/docs/guides/validation-chain",component:p("/docs/guides/validation-chain","c13"),exact:!0,sidebar:"docs"},{path:"/docs/migration-v5-to-v6",component:p("/docs/migration-v5-to-v6","68d"),exact:!0,sidebar:"docs"},{path:"/docs/migration-v6-to-v7",component:p("/docs/migration-v6-to-v7","e73"),exact:!0,sidebar:"docs"}]},{path:"/",component:p("/","a06"),exact:!0},{path:"*",component:p("*")}]},8944:(e,t,n)=>{"use strict";function a(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti});const i=function(){for(var e,t,n=0,i="";n{"use strict";n.d(t,{lX:()=>x,q_:()=>P,ob:()=>h,PP:()=>I,Ep:()=>m,Hp:()=>v});var a=n(5773);function i(e){return"/"===e.charAt(0)}function r(e,t){for(var n=t,a=n+1,i=e.length;a=0;p--){var f=o[p];"."===f?r(o,p):".."===f?(r(o,p),u++):u&&(r(o,p),u--)}if(!l)for(;u--;u)o.unshift("..");!l||""===o[0]||o[0]&&i(o[0])||o.unshift("");var m=o.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const c=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,a){return e(t,n[a])}));if("object"==typeof t||"object"==typeof n){var a=s(t),i=s(n);return a!==t||i!==n?e(a,i):Object.keys(Object.assign({},t,n)).every((function(a){return e(t[a],n[a])}))}return!1};var l=n(2215);function d(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,a=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(i+="#"===a.charAt(0)?a:"#"+a),i}function h(e,t,n,i){var r;"string"==typeof e?(r=function(e){var t=e||"/",n="",a="",i=t.indexOf("#");-1!==i&&(a=t.substr(i),t=t.substr(0,i));var r=t.indexOf("?");return-1!==r&&(n=t.substr(r),t=t.substr(0,r)),{pathname:t,search:"?"===n?"":n,hash:"#"===a?"":a}}(e),r.state=t):(void 0===(r=(0,a.Z)({},e)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==t&&void 0===r.state&&(r.state=t));try{r.pathname=decodeURI(r.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(r.key=n),i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=o(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&c(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,a,i){if(null!=e){var r="function"==typeof e?e(t,n):e;"string"==typeof r?"function"==typeof a?a(r,i):i(!0):i(!1!==r)}else i(!0)},appendListener:function(e){var n=!0;function a(){n&&e.apply(void 0,arguments)}return t.push(a),function(){n=!1,t=t.filter((function(e){return e!==a}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),a=0;at?n.splice(t,n.length-t,i):n.push(i),u({action:a,location:i,index:t,entries:n})}}))},replace:function(e,t){var a="REPLACE",i=h(e,t,p(),w.location);d.confirmTransitionTo(i,a,n,(function(e){e&&(w.entries[w.index]=i,u({action:a,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var a=n(9185),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return a.isMemo(e)?o:s[e.$$typeof]||i}s[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[a.Memo]=o;var l=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,a){if("string"!=typeof n){if(m){var i=f(n);i&&i!==m&&e(t,i,a)}var o=d(n);u&&(o=o.concat(u(n)));for(var s=c(t),h=c(n),v=0;v{"use strict";e.exports=function(e,t,n,a,i,r,o,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,a,i,r,o,s],d=0;(c=new Error(t.replace(/%s/g,(function(){return l[d++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},142:(e,t,n)=>{"use strict";n.r(t)},2128:(e,t,n)=>{"use strict";n.r(t)},8504:function(e,t,n){var a,i;a=function(){var e,t,n={version:"0.2.0"},a=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function i(e,t,n){return en?n:e}function r(e){return 100*(-1+e)}function o(e,t,n){var i;return(i="translate3d"===a.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===a.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"}).transition="all "+t+"ms "+n,i}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(a[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=i(e,a.minimum,1),n.status=1===e?null:e;var r=n.render(!t),l=r.querySelector(a.barSelector),d=a.speed,u=a.easing;return r.offsetWidth,s((function(t){""===a.positionUsing&&(a.positionUsing=n.getPositioningCSS()),c(l,o(e,d,u)),1===e?(c(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout((function(){c(r,{transition:"all "+d+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),d)}),d)):setTimeout(t,d)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),a.trickleSpeed)};return a.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*i(Math.random()*t,.1,.95)),t=i(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*a.trickleRate)},e=0,t=0,n.promise=function(a){return a&&"resolved"!==a.state()?(0===t&&n.start(),e++,t++,a.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");d(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=a.template;var i,o=t.querySelector(a.barSelector),s=e?"-100":r(n.status||0),l=document.querySelector(a.parent);return c(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),a.showSpinner||(i=t.querySelector(a.spinnerSelector))&&f(i),l!=document.body&&d(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(a.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function a(t){var n=document.body.style;if(t in n)return t;for(var a,i=e.length,r=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((a=e[i]+r)in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=a(e))}function r(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,a,i=arguments;if(2==i.length)for(n in t)void 0!==(a=t[n])&&t.hasOwnProperty(n)&&r(e,n,a);else r(e,i[1],i[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function d(e,t){var n=p(e),a=n+t;l(n,t)||(e.className=a.substring(1))}function u(e,t){var n,a=p(e);l(e,t)&&(n=a.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(i="function"==typeof a?a.call(t,n,t,e):a)||(e.exports=i)},2525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(i){return!1}}()?Object.assign:function(e,r){for(var o,s,c=i(e),l=1;l{"use strict";n.d(t,{Z:()=>r});var a=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},a={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=u.reach);x+=_.value.length,_=_.next){var E=_.value;if(t.length>e.length)return;if(!(E instanceof i)){var S,T=1;if(g){if(!(S=r(k,x,e,b))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,P=x;for(P+=_.value.length;C>=P;)P+=(_=_.next).value.length;if(x=P-=_.value.length,_.value instanceof i)continue;for(var R=_;R!==t.tail&&(Pu.reach&&(u.reach=L);var z=_.prev;if(O&&(z=c(t,z,O),x+=O.length),l(t,z,T),_=c(t,z,new i(p,v?a.tokenize(I,v):I,y,I)),N&&c(t,_,N),T>1){var D={cause:p+","+m,reach:L};o(e,t,n,_.prev,x,D),u&&D.reach>u.reach&&(u.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var a=t.next,i={value:n,prev:t,next:a};return t.next=i,a.prev=i,e.length++,i}function l(e,t,n){for(var a=t.next,i=0;i"+r.content+""},a}(),i=a;a.default=a,i.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},i.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(i.languages.markup.tag,"addAttribute",{value:function(e,t){i.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:i.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=a.variable[1].inside,o=0;o]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.c=i.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),i.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),i.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},i.languages.c.string],char:i.languages.c.char,comment:i.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:i.languages.c}}}}),i.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete i.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(i),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(i),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var a={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:i})}(i),i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),i.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),i.languages.markup&&(i.languages.markup.tag.addInlined("script","javascript"),i.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),i.languages.js=i.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(i),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),r=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return a})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return a}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return a})).replace(/<>/g,(function(){return"(?:"+i+"|"+r+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(r),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(i),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return a})),r=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+r+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+r+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+r+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,a=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(i),i.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:i.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},i.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=p(/^\{$/,/^\}$/);if(-1===s)continue;for(var c=n;c=0&&f(l,"variable-input")}}}}function d(e){return t[n+e]}function u(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,a=t.inside.interpolation,i=a.inside["interpolation-punctuation"],r=a.pattern.source;function o(t,a){if(e.languages[t])return{pattern:RegExp("((?:"+a+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function c(t,n,a){var i={code:t,grammar:n,language:a};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(i.code,i.grammar),e.hooks.run("after-tokenize",i),i.tokens}function l(t){var n={};n["interpolation-punctuation"]=i;var r=e.tokenize(t,n);if(3===r.length){var o=[1,1];o.push.apply(o,c(r[1],e.languages.javascript,"javascript")),r.splice.apply(r,o)}return new e.Token("interpolation",r,a.alias,t)}function d(t,n,a){var i=e.tokenize(t,{interpolation:{pattern:RegExp(r),lookbehind:!0}}),o=0,d={},u=c(i.map((function(e){if("string"==typeof e)return e;for(var n,i=e.content;-1!==t.indexOf(n=s(o++,a)););return d[n]=i,n})).join(""),n,a),p=Object.keys(d);return o=0,function e(t){for(var n=0;n=p.length)return;var a=t[n];if("string"==typeof a||"string"==typeof a.content){var i=p[o],r="string"==typeof a?a:a.content,s=r.indexOf(i);if(-1!==s){++o;var c=r.substring(0,s),u=l(d[i]),f=r.substring(s+i.length),m=[];if(c&&m.push(c),m.push(u),f){var h=[f];e(h),m.push.apply(m,h)}"string"==typeof a?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):a.content=m}}else{var v=a.content;Array.isArray(v)?e(v):e([v])}}}(u),new e.Token(a,u,"language-"+a,t)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in u&&function t(n){for(var a=0,i=n.length;a]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(i),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],a=0;a*\.{3}(?:[^{}]|)*\})/.source;function r(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return a})).replace(//g,(function(){return i})),RegExp(e,t)}i=r(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=r(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:r(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:r(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],a=0;a0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:r=!0),(r||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var c=o(i);a0&&("string"==typeof t[a-1]||"plain-text"===t[a-1].type)&&(c=o(t[a-1])+c,t.splice(a-1,1),a--),t[a]=new e.Token("plain-text",c,null,c)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(i),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var a=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+a+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(i),i.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},i.languages.go=i.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),i.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete i.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,a,i,r){if(n.language===a){var o=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof r&&!r(e))return e;for(var i,s=o.length;-1!==n.code.indexOf(i=t(a,s));)++s;return o[s]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,a){if(n.language===a&&n.tokenStack){n.grammar=e.languages[a];var i=0,r=Object.keys(n.tokenStack);!function o(s){for(var c=0;c=r.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var d=r[i],u=n.tokenStack[d],p="string"==typeof l?l:l.content,f=t(a,d),m=p.indexOf(f);if(m>-1){++i;var h=p.substring(0,m),v=new e.Token(a,e.tokenize(u,n.grammar),"language-"+a,u),b=p.substring(m+f.length),g=[];h&&g.push.apply(g,o([h])),g.push(v),b&&g.push.apply(g,o([b])),"string"==typeof l?s.splice.apply(s,[c,1].concat(g)):l.content=g}}else l.content&&o(l.content)}return s}(n.tokens)}}}})}(i),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(i),i.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},i.languages.webmanifest=i.languages.json,i.languages.less=i.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),i.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),i.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},i.languages.objectivec=i.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete i.languages.objectivec["class-name"],i.languages.objc=i.languages.objectivec,i.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},i.languages.python["string-interpolation"].inside.interpolation.inside.rest=i.languages.python,i.languages.py=i.languages.python,i.languages.reason=i.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),i.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete i.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(i),i.languages.scss=i.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),i.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),i.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),i.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),i.languages.scss.atrule.inside.rest=i.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},a={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};a.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:a}},a.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:a}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:a}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:a}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:a}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:a.interpolation}},rest:a}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:a.interpolation,comment:a.comment,punctuation:/[{},]/}},func:a.func,string:a.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:a.interpolation,punctuation:/[{}()\[\];:.]/}}(i),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(i),i.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const r=i},9911:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},3916:(e,t,n)=>{const a=n(9911),i=n(4587),r=new Set;function o(e){void 0===e?e=Object.keys(a.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...r,...Object.keys(Prism.languages)];i(a,e,t).load((e=>{if(!(e in a.languages))return void(o.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3392).resolve(t)],delete Prism.languages[e],n(3392)(t),r.add(e)}))}o.silent=!1,e.exports=o},3392:(e,t,n)=>{var a={"./":3916};function i(e){var t=r(e);return n(t)}function r(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}i.keys=function(){return Object.keys(a)},i.resolve=r,e.exports=i,i.id=3392},4587:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,a=e.length;n "));var s={},c=e[a];if(c){function l(t){if(!(t in e))throw new Error(a+" depends on an unknown component "+t);if(!(t in s))for(var o in i(t,r),s[t]=!0,n[t])s[o]=!0}t(c.require,l),t(c.optional,l),t(c.modify,l)}n[a]=s,r.pop()}}return function(e){var t=n[e];return t||(i(e,a),t=n[e]),t}}function i(e){for(var t in e)return!0;return!1}return function(r,o,s){var c=function(e){var t={};for(var n in e){var a=e[n];for(var i in a)if("meta"!=i){var r=a[i];t[i]="string"==typeof r?{title:r}:r}}return t}(r),l=function(e){var n;return function(a){if(a in e)return a;if(!n)for(var i in n={},e){var r=e[i];t(r&&r.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+i+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+i+" because it is a component.");n[t]=i}))}return n[a]||a}}(c);o=o.map(l),s=(s||[]).map(l);var d=n(o),u=n(s);o.forEach((function e(n){var a=c[n];t(a&&a.require,(function(t){t in u||(d[t]=!0,e(t))}))}));for(var p,f=a(c),m=d;i(m);){for(var h in p={},m){var v=c[h];t(v&&v.modify,(function(e){e in u&&(p[e]=!0)}))}for(var b in u)if(!(b in d))for(var g in f(b))if(g in d){p[b]=!0;break}for(var y in m=p)d[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,a,i){var r=i?i.series:void 0,o=i?i.parallel:e,s={},c={};function l(e){if(e in s)return s[e];c[e]=!0;var i,d=[];for(var u in t(e))u in n&&d.push(u);if(0===d.length)i=a(e);else{var p=o(d.map((function(e){var t=l(e);return delete c[e],t})));r?i=r(p,(function(){return a(e)})):a(e)}return s[e]=i}for(var d in n)l(d);var u=[];for(var p in c)u.push(s[p]);return o(u)}(f,d,t,n)}};return w}}();e.exports=t},8772:(e,t,n)=>{"use strict";var a=n(331);function i(){}function r(){}r.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,r,o){if(o!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:i};return n.PropTypes=n,n}},3615:(e,t,n)=>{e.exports=n(8772)()},331:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3577:(e,t,n)=>{"use strict";var a=n(7378),i=n(2525),r=n(1102);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n