diff --git a/404.html b/404.html index f043c50a..8ad3aca2 100644 --- a/404.html +++ b/404.html @@ -16,7 +16,7 @@
- + \ No newline at end of file diff --git a/advanced/custom-instance.html b/advanced/custom-instance.html index 9f9ccb0c..d1c932c4 100644 --- a/advanced/custom-instance.html +++ b/advanced/custom-instance.html @@ -13,7 +13,7 @@ - + @@ -90,8 +90,8 @@ validator: (v) => v > 0, }) } -} - +} + \ No newline at end of file diff --git a/advanced/extending-vue-types.html b/advanced/extending-vue-types.html index 3c452358..5758c909 100644 --- a/advanced/extending-vue-types.html +++ b/advanced/extending-vue-types.html @@ -13,7 +13,7 @@ - + @@ -225,8 +225,8 @@ count: VueTypes.positive, }, }) -</script> - +</script> + \ No newline at end of file diff --git a/advanced/typescript.html b/advanced/typescript.html index 5ef467c0..93a803f4 100644 --- a/advanced/typescript.html +++ b/advanced/typescript.html @@ -13,7 +13,7 @@ - + @@ -136,8 +136,8 @@ }

As a general rule, we strongly suggest to use const assertions whenever possible.

ts
props: {
   // type checker and runtime error
   sizes: oneOf(['large'] as const).def('medium')
-}
- +} + \ No newline at end of file diff --git a/assets/advanced_custom-instance.md.VAIxW2UG.js b/assets/advanced_custom-instance.md.COUMKz6y.js similarity index 99% rename from assets/advanced_custom-instance.md.VAIxW2UG.js rename to assets/advanced_custom-instance.md.COUMKz6y.js index b7f8080a..2fc9809f 100644 --- a/assets/advanced_custom-instance.md.VAIxW2UG.js +++ b/assets/advanced_custom-instance.md.COUMKz6y.js @@ -1,4 +1,4 @@ -import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Custom namespaced instance","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/custom-instance.md","filePath":"advanced/custom-instance.md","lastUpdated":1732061061000}'),p={name:"advanced/custom-instance.md"};function t(l,s,h,k,d,r){return e(),a("div",null,s[0]||(s[0]=[n(`

Custom namespaced instance

The sensibleDefaults and extend features let you customize the library to better fit into your project.

Anyway, they come with a downside: because they mutate the same VueTypes object, applications sharing the same module (ie: importing the same library instance from node_modules) might alter one another the behavior of validators.

For example suppose we have a library core and an application ui both using VueTypes. In core we define a custom default and use it:

js
// core/types.js
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Custom namespaced instance","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/custom-instance.md","filePath":"advanced/custom-instance.md","lastUpdated":1733027442000}'),p={name:"advanced/custom-instance.md"};function t(l,s,h,k,d,r){return e(),a("div",null,s[0]||(s[0]=[n(`

Custom namespaced instance

The sensibleDefaults and extend features let you customize the library to better fit into your project.

Anyway, they come with a downside: because they mutate the same VueTypes object, applications sharing the same module (ie: importing the same library instance from node_modules) might alter one another the behavior of validators.

For example suppose we have a library core and an application ui both using VueTypes. In core we define a custom default and use it:

js
// core/types.js
 import VueTypes from 'vue-types'
 
 VueTypes.sensibleDefaults = {
diff --git a/assets/advanced_custom-instance.md.VAIxW2UG.lean.js b/assets/advanced_custom-instance.md.COUMKz6y.lean.js
similarity index 99%
rename from assets/advanced_custom-instance.md.VAIxW2UG.lean.js
rename to assets/advanced_custom-instance.md.COUMKz6y.lean.js
index b7f8080a..2fc9809f 100644
--- a/assets/advanced_custom-instance.md.VAIxW2UG.lean.js
+++ b/assets/advanced_custom-instance.md.COUMKz6y.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Custom namespaced instance","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/custom-instance.md","filePath":"advanced/custom-instance.md","lastUpdated":1732061061000}'),p={name:"advanced/custom-instance.md"};function t(l,s,h,k,d,r){return e(),a("div",null,s[0]||(s[0]=[n(`

Custom namespaced instance

The sensibleDefaults and extend features let you customize the library to better fit into your project.

Anyway, they come with a downside: because they mutate the same VueTypes object, applications sharing the same module (ie: importing the same library instance from node_modules) might alter one another the behavior of validators.

For example suppose we have a library core and an application ui both using VueTypes. In core we define a custom default and use it:

js
// core/types.js
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Custom namespaced instance","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/custom-instance.md","filePath":"advanced/custom-instance.md","lastUpdated":1733027442000}'),p={name:"advanced/custom-instance.md"};function t(l,s,h,k,d,r){return e(),a("div",null,s[0]||(s[0]=[n(`

Custom namespaced instance

The sensibleDefaults and extend features let you customize the library to better fit into your project.

Anyway, they come with a downside: because they mutate the same VueTypes object, applications sharing the same module (ie: importing the same library instance from node_modules) might alter one another the behavior of validators.

For example suppose we have a library core and an application ui both using VueTypes. In core we define a custom default and use it:

js
// core/types.js
 import VueTypes from 'vue-types'
 
 VueTypes.sensibleDefaults = {
diff --git a/assets/advanced_extending-vue-types.md.DKUpT8Vz.js b/assets/advanced_extending-vue-types.md.CHWEadSg.js
similarity index 99%
rename from assets/advanced_extending-vue-types.md.DKUpT8Vz.js
rename to assets/advanced_extending-vue-types.md.CHWEadSg.js
index aa9c74b9..f4c6cbcb 100644
--- a/assets/advanced_extending-vue-types.md.DKUpT8Vz.js
+++ b/assets/advanced_extending-vue-types.md.CHWEadSg.js
@@ -1,4 +1,4 @@
-import{_ as p,c as l,j as s,a,G as t,a0 as e,B as h,o as k}from"./chunks/framework.D25Vw4RT.js";const C=JSON.parse('{"title":"Extending VueTypes","description":"","frontmatter":{"outline":2},"headers":[],"relativePath":"advanced/extending-vue-types.md","filePath":"advanced/extending-vue-types.md","lastUpdated":1732061061000}'),d={name:"advanced/extending-vue-types.md"},r={class:"table-of-contents"},E={href:"#the-extend-method"},g={id:"the-extend-method",tabindex:"-1"};function y(o,i,c,F,u,m){const n=h("Badge");return k(),l("div",null,[i[9]||(i[9]=s("h1",{id:"extending-vuetypes",tabindex:"-1"},[a("Extending VueTypes "),s("a",{class:"header-anchor",href:"#extending-vuetypes","aria-label":'Permalink to "Extending VueTypes"'},"​")],-1)),s("nav",r,[s("ul",null,[i[2]||(i[2]=s("li",null,[s("a",{href:"#standalone-custom-validators"},"Standalone custom validators"),s("ul",null,[s("li",null,[s("a",{href:"#custom-validators-from-scratch"},"Custom validators from scratch")]),s("li",null,[s("a",{href:"#inheriting-from-existing-validators"},"Inheriting from existing validators")])])],-1)),i[3]||(i[3]=s("li",null,[s("a",{href:"#extending-namespaced-validators-in-es6"},"Extending namespaced validators in ES6+")],-1)),s("li",null,[s("a",E,[i[0]||(i[0]=a("The extend() method ")),t(n,{text:"deprecated",type:"warning"})]),i[1]||(i[1]=s("ul",null,[s("li",null,[s("a",{href:"#inherit-from-vuetypes-validators"},"Inherit from VueTypes validators")]),s("li",null,[s("a",{href:"#define-multiple-validators"},"Define multiple validators")]),s("li",null,[s("a",{href:"#typescript"},"Typescript")])],-1))])])]),i[10]||(i[10]=e(`

Standalone custom validators

The toType, toValidableType and fromType functions can be used to create custom standalone validators. Indeed, they are used internally by vue-types in native and custom validators.

Custom validators from scratch

In the following example we define a validator for positive numbers:

js
const positive = () =>
+import{_ as p,c as l,j as s,a,G as t,a0 as e,B as h,o as k}from"./chunks/framework.D25Vw4RT.js";const C=JSON.parse('{"title":"Extending VueTypes","description":"","frontmatter":{"outline":2},"headers":[],"relativePath":"advanced/extending-vue-types.md","filePath":"advanced/extending-vue-types.md","lastUpdated":1733027442000}'),d={name:"advanced/extending-vue-types.md"},r={class:"table-of-contents"},E={href:"#the-extend-method"},g={id:"the-extend-method",tabindex:"-1"};function y(o,i,c,F,u,m){const n=h("Badge");return k(),l("div",null,[i[9]||(i[9]=s("h1",{id:"extending-vuetypes",tabindex:"-1"},[a("Extending VueTypes "),s("a",{class:"header-anchor",href:"#extending-vuetypes","aria-label":'Permalink to "Extending VueTypes"'},"​")],-1)),s("nav",r,[s("ul",null,[i[2]||(i[2]=s("li",null,[s("a",{href:"#standalone-custom-validators"},"Standalone custom validators"),s("ul",null,[s("li",null,[s("a",{href:"#custom-validators-from-scratch"},"Custom validators from scratch")]),s("li",null,[s("a",{href:"#inheriting-from-existing-validators"},"Inheriting from existing validators")])])],-1)),i[3]||(i[3]=s("li",null,[s("a",{href:"#extending-namespaced-validators-in-es6"},"Extending namespaced validators in ES6+")],-1)),s("li",null,[s("a",E,[i[0]||(i[0]=a("The extend() method ")),t(n,{text:"deprecated",type:"warning"})]),i[1]||(i[1]=s("ul",null,[s("li",null,[s("a",{href:"#inherit-from-vuetypes-validators"},"Inherit from VueTypes validators")]),s("li",null,[s("a",{href:"#define-multiple-validators"},"Define multiple validators")]),s("li",null,[s("a",{href:"#typescript"},"Typescript")])],-1))])])]),i[10]||(i[10]=e(`

Standalone custom validators

The toType, toValidableType and fromType functions can be used to create custom standalone validators. Indeed, they are used internally by vue-types in native and custom validators.

Custom validators from scratch

In the following example we define a validator for positive numbers:

js
const positive = () =>
   toType('positive', {
     type: Number,
     validator: (v) => v >= 0,
diff --git a/assets/advanced_extending-vue-types.md.DKUpT8Vz.lean.js b/assets/advanced_extending-vue-types.md.CHWEadSg.lean.js
similarity index 99%
rename from assets/advanced_extending-vue-types.md.DKUpT8Vz.lean.js
rename to assets/advanced_extending-vue-types.md.CHWEadSg.lean.js
index aa9c74b9..f4c6cbcb 100644
--- a/assets/advanced_extending-vue-types.md.DKUpT8Vz.lean.js
+++ b/assets/advanced_extending-vue-types.md.CHWEadSg.lean.js
@@ -1,4 +1,4 @@
-import{_ as p,c as l,j as s,a,G as t,a0 as e,B as h,o as k}from"./chunks/framework.D25Vw4RT.js";const C=JSON.parse('{"title":"Extending VueTypes","description":"","frontmatter":{"outline":2},"headers":[],"relativePath":"advanced/extending-vue-types.md","filePath":"advanced/extending-vue-types.md","lastUpdated":1732061061000}'),d={name:"advanced/extending-vue-types.md"},r={class:"table-of-contents"},E={href:"#the-extend-method"},g={id:"the-extend-method",tabindex:"-1"};function y(o,i,c,F,u,m){const n=h("Badge");return k(),l("div",null,[i[9]||(i[9]=s("h1",{id:"extending-vuetypes",tabindex:"-1"},[a("Extending VueTypes "),s("a",{class:"header-anchor",href:"#extending-vuetypes","aria-label":'Permalink to "Extending VueTypes"'},"​")],-1)),s("nav",r,[s("ul",null,[i[2]||(i[2]=s("li",null,[s("a",{href:"#standalone-custom-validators"},"Standalone custom validators"),s("ul",null,[s("li",null,[s("a",{href:"#custom-validators-from-scratch"},"Custom validators from scratch")]),s("li",null,[s("a",{href:"#inheriting-from-existing-validators"},"Inheriting from existing validators")])])],-1)),i[3]||(i[3]=s("li",null,[s("a",{href:"#extending-namespaced-validators-in-es6"},"Extending namespaced validators in ES6+")],-1)),s("li",null,[s("a",E,[i[0]||(i[0]=a("The extend() method ")),t(n,{text:"deprecated",type:"warning"})]),i[1]||(i[1]=s("ul",null,[s("li",null,[s("a",{href:"#inherit-from-vuetypes-validators"},"Inherit from VueTypes validators")]),s("li",null,[s("a",{href:"#define-multiple-validators"},"Define multiple validators")]),s("li",null,[s("a",{href:"#typescript"},"Typescript")])],-1))])])]),i[10]||(i[10]=e(`

Standalone custom validators

The toType, toValidableType and fromType functions can be used to create custom standalone validators. Indeed, they are used internally by vue-types in native and custom validators.

Custom validators from scratch

In the following example we define a validator for positive numbers:

js
const positive = () =>
+import{_ as p,c as l,j as s,a,G as t,a0 as e,B as h,o as k}from"./chunks/framework.D25Vw4RT.js";const C=JSON.parse('{"title":"Extending VueTypes","description":"","frontmatter":{"outline":2},"headers":[],"relativePath":"advanced/extending-vue-types.md","filePath":"advanced/extending-vue-types.md","lastUpdated":1733027442000}'),d={name:"advanced/extending-vue-types.md"},r={class:"table-of-contents"},E={href:"#the-extend-method"},g={id:"the-extend-method",tabindex:"-1"};function y(o,i,c,F,u,m){const n=h("Badge");return k(),l("div",null,[i[9]||(i[9]=s("h1",{id:"extending-vuetypes",tabindex:"-1"},[a("Extending VueTypes "),s("a",{class:"header-anchor",href:"#extending-vuetypes","aria-label":'Permalink to "Extending VueTypes"'},"​")],-1)),s("nav",r,[s("ul",null,[i[2]||(i[2]=s("li",null,[s("a",{href:"#standalone-custom-validators"},"Standalone custom validators"),s("ul",null,[s("li",null,[s("a",{href:"#custom-validators-from-scratch"},"Custom validators from scratch")]),s("li",null,[s("a",{href:"#inheriting-from-existing-validators"},"Inheriting from existing validators")])])],-1)),i[3]||(i[3]=s("li",null,[s("a",{href:"#extending-namespaced-validators-in-es6"},"Extending namespaced validators in ES6+")],-1)),s("li",null,[s("a",E,[i[0]||(i[0]=a("The extend() method ")),t(n,{text:"deprecated",type:"warning"})]),i[1]||(i[1]=s("ul",null,[s("li",null,[s("a",{href:"#inherit-from-vuetypes-validators"},"Inherit from VueTypes validators")]),s("li",null,[s("a",{href:"#define-multiple-validators"},"Define multiple validators")]),s("li",null,[s("a",{href:"#typescript"},"Typescript")])],-1))])])]),i[10]||(i[10]=e(`

Standalone custom validators

The toType, toValidableType and fromType functions can be used to create custom standalone validators. Indeed, they are used internally by vue-types in native and custom validators.

Custom validators from scratch

In the following example we define a validator for positive numbers:

js
const positive = () =>
   toType('positive', {
     type: Number,
     validator: (v) => v >= 0,
diff --git a/assets/advanced_typescript.md.BozNiqGA.js b/assets/advanced_typescript.md.Bs5asQQh.js
similarity index 99%
rename from assets/advanced_typescript.md.BozNiqGA.js
rename to assets/advanced_typescript.md.Bs5asQQh.js
index 72a7801a..25795279 100644
--- a/assets/advanced_typescript.md.BozNiqGA.js
+++ b/assets/advanced_typescript.md.Bs5asQQh.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const g=JSON.parse('{"title":"TypeScript Usage","description":"","frontmatter":{"outline":[2,3]},"headers":[],"relativePath":"advanced/typescript.md","filePath":"advanced/typescript.md","lastUpdated":1732061061000}'),p={name:"advanced/typescript.md"};function h(l,s,e,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

TypeScript Usage

VueTypes is written in TypeScript and comes with full builtin types support.

Most of the validators can infer the prop type from their configuration:

ts
props: {
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const g=JSON.parse('{"title":"TypeScript Usage","description":"","frontmatter":{"outline":[2,3]},"headers":[],"relativePath":"advanced/typescript.md","filePath":"advanced/typescript.md","lastUpdated":1733027442000}'),p={name:"advanced/typescript.md"};function h(l,s,e,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

TypeScript Usage

VueTypes is written in TypeScript and comes with full builtin types support.

Most of the validators can infer the prop type from their configuration:

ts
props: {
   // prop type is \`string\`
   name: string(),
   // ERROR: Argument of type 'boolean' is not assignable to parameter of type 'string'
diff --git a/assets/advanced_typescript.md.BozNiqGA.lean.js b/assets/advanced_typescript.md.Bs5asQQh.lean.js
similarity index 99%
rename from assets/advanced_typescript.md.BozNiqGA.lean.js
rename to assets/advanced_typescript.md.Bs5asQQh.lean.js
index 72a7801a..25795279 100644
--- a/assets/advanced_typescript.md.BozNiqGA.lean.js
+++ b/assets/advanced_typescript.md.Bs5asQQh.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const g=JSON.parse('{"title":"TypeScript Usage","description":"","frontmatter":{"outline":[2,3]},"headers":[],"relativePath":"advanced/typescript.md","filePath":"advanced/typescript.md","lastUpdated":1732061061000}'),p={name:"advanced/typescript.md"};function h(l,s,e,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

TypeScript Usage

VueTypes is written in TypeScript and comes with full builtin types support.

Most of the validators can infer the prop type from their configuration:

ts
props: {
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const g=JSON.parse('{"title":"TypeScript Usage","description":"","frontmatter":{"outline":[2,3]},"headers":[],"relativePath":"advanced/typescript.md","filePath":"advanced/typescript.md","lastUpdated":1733027442000}'),p={name:"advanced/typescript.md"};function h(l,s,e,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

TypeScript Usage

VueTypes is written in TypeScript and comes with full builtin types support.

Most of the validators can infer the prop type from their configuration:

ts
props: {
   // prop type is \`string\`
   name: string(),
   // ERROR: Argument of type 'boolean' is not assignable to parameter of type 'string'
diff --git a/assets/guide_configuration.md.Bua8Nzk_.js b/assets/guide_configuration.md.CtRJqKbi.js
similarity index 98%
rename from assets/guide_configuration.md.Bua8Nzk_.js
rename to assets/guide_configuration.md.CtRJqKbi.js
index 4c6127e0..38453161 100644
--- a/assets/guide_configuration.md.Bua8Nzk_.js
+++ b/assets/guide_configuration.md.CtRJqKbi.js
@@ -1,4 +1,4 @@
-import{_ as s,c as a,a0 as e,o as n}from"./chunks/framework.D25Vw4RT.js";const k=JSON.parse('{"title":"Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1732061061000}'),t={name:"guide/configuration.md"};function o(l,i,p,r,h,d){return n(),a("div",null,i[0]||(i[0]=[e(`

Configuration

Starting from version 4, VueTypes has a global configuration object that can be used to customize the library's behavior.

The configuration is exposed both as a property of the default export, and as a named export:

ts
// default exported instance
+import{_ as s,c as a,a0 as e,o as n}from"./chunks/framework.D25Vw4RT.js";const k=JSON.parse('{"title":"Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1733027442000}'),t={name:"guide/configuration.md"};function o(l,i,p,r,h,d){return n(),a("div",null,i[0]||(i[0]=[e(`

Configuration

Starting from version 4, VueTypes has a global configuration object that can be used to customize the library's behavior.

The configuration is exposed both as a property of the default export, and as a named export:

ts
// default exported instance
 import VueTypes from 'vue-types'
 
 // named export
diff --git a/assets/guide_configuration.md.Bua8Nzk_.lean.js b/assets/guide_configuration.md.CtRJqKbi.lean.js
similarity index 98%
rename from assets/guide_configuration.md.Bua8Nzk_.lean.js
rename to assets/guide_configuration.md.CtRJqKbi.lean.js
index 4c6127e0..38453161 100644
--- a/assets/guide_configuration.md.Bua8Nzk_.lean.js
+++ b/assets/guide_configuration.md.CtRJqKbi.lean.js
@@ -1,4 +1,4 @@
-import{_ as s,c as a,a0 as e,o as n}from"./chunks/framework.D25Vw4RT.js";const k=JSON.parse('{"title":"Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1732061061000}'),t={name:"guide/configuration.md"};function o(l,i,p,r,h,d){return n(),a("div",null,i[0]||(i[0]=[e(`

Configuration

Starting from version 4, VueTypes has a global configuration object that can be used to customize the library's behavior.

The configuration is exposed both as a property of the default export, and as a named export:

ts
// default exported instance
+import{_ as s,c as a,a0 as e,o as n}from"./chunks/framework.D25Vw4RT.js";const k=JSON.parse('{"title":"Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"guide/configuration.md","filePath":"guide/configuration.md","lastUpdated":1733027442000}'),t={name:"guide/configuration.md"};function o(l,i,p,r,h,d){return n(),a("div",null,i[0]||(i[0]=[e(`

Configuration

Starting from version 4, VueTypes has a global configuration object that can be used to customize the library's behavior.

The configuration is exposed both as a property of the default export, and as a named export:

ts
// default exported instance
 import VueTypes from 'vue-types'
 
 // named export
diff --git a/assets/guide_installation.md.CCNB_j3-.js b/assets/guide_installation.md.NcEiVHpN.js
similarity index 99%
rename from assets/guide_installation.md.CCNB_j3-.js
rename to assets/guide_installation.md.NcEiVHpN.js
index 9abda0dc..4de8ece8 100644
--- a/assets/guide_installation.md.CCNB_j3-.js
+++ b/assets/guide_installation.md.NcEiVHpN.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1732061061000}'),t={name:"guide/installation.md"};function l(p,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Installation

VERSION NOTE

This guide covers VueTypes 2+.

  • VueTypes 2 is compatible with Vue 1 and 2.
  • VueTypes 4+ is compatible with Vue 2 and Vue 3.

NPM package

bash
npm install vue-types --save

CDN delivered script

Add the following script tags before your code

html
<script src="https://unpkg.com/vue-types@5"></script>
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1733027442000}'),t={name:"guide/installation.md"};function l(p,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Installation

VERSION NOTE

This guide covers VueTypes 2+.

  • VueTypes 2 is compatible with Vue 1 and 2.
  • VueTypes 4+ is compatible with Vue 2 and Vue 3.

NPM package

bash
npm install vue-types --save

CDN delivered script

Add the following script tags before your code

html
<script src="https://unpkg.com/vue-types@5"></script>
 
 <!-- Or -->
 
diff --git a/assets/guide_installation.md.CCNB_j3-.lean.js b/assets/guide_installation.md.NcEiVHpN.lean.js
similarity index 99%
rename from assets/guide_installation.md.CCNB_j3-.lean.js
rename to assets/guide_installation.md.NcEiVHpN.lean.js
index 9abda0dc..4de8ece8 100644
--- a/assets/guide_installation.md.CCNB_j3-.lean.js
+++ b/assets/guide_installation.md.NcEiVHpN.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1732061061000}'),t={name:"guide/installation.md"};function l(p,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Installation

VERSION NOTE

This guide covers VueTypes 2+.

  • VueTypes 2 is compatible with Vue 1 and 2.
  • VueTypes 4+ is compatible with Vue 2 and Vue 3.

NPM package

bash
npm install vue-types --save

CDN delivered script

Add the following script tags before your code

html
<script src="https://unpkg.com/vue-types@5"></script>
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md","lastUpdated":1733027442000}'),t={name:"guide/installation.md"};function l(p,s,h,k,r,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Installation

VERSION NOTE

This guide covers VueTypes 2+.

  • VueTypes 2 is compatible with Vue 1 and 2.
  • VueTypes 4+ is compatible with Vue 2 and Vue 3.

NPM package

bash
npm install vue-types --save

CDN delivered script

Add the following script tags before your code

html
<script src="https://unpkg.com/vue-types@5"></script>
 
 <!-- Or -->
 
diff --git a/assets/guide_namespaced.md.EtgPGufb.js b/assets/guide_namespaced.md.CGNWIJFI.js
similarity index 99%
rename from assets/guide_namespaced.md.EtgPGufb.js
rename to assets/guide_namespaced.md.CGNWIJFI.js
index 8d933ec5..5f26530c 100644
--- a/assets/guide_namespaced.md.EtgPGufb.js
+++ b/assets/guide_namespaced.md.CGNWIJFI.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as t,o as n}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Namespaced Usage","description":"","frontmatter":{},"headers":[],"relativePath":"guide/namespaced.md","filePath":"guide/namespaced.md","lastUpdated":1732061061000}'),e={name:"guide/namespaced.md"};function l(p,s,h,k,d,r){return n(),a("div",null,s[0]||(s[0]=[t(`

Namespaced Usage

The default export of vue-types exposes an ES6 class object that mimics React prop-type.

The class object exposes both native and custom validators.

Native Validators

Native validators are exposed as static getter factories:

js
import VueTypes from 'vue-types'
+import{_ as i,c as a,a0 as t,o as n}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Namespaced Usage","description":"","frontmatter":{},"headers":[],"relativePath":"guide/namespaced.md","filePath":"guide/namespaced.md","lastUpdated":1733027442000}'),e={name:"guide/namespaced.md"};function l(p,s,h,k,d,r){return n(),a("div",null,s[0]||(s[0]=[t(`

Namespaced Usage

The default export of vue-types exposes an ES6 class object that mimics React prop-type.

The class object exposes both native and custom validators.

Native Validators

Native validators are exposed as static getter factories:

js
import VueTypes from 'vue-types'
 
 export default {
   props: {
diff --git a/assets/guide_namespaced.md.EtgPGufb.lean.js b/assets/guide_namespaced.md.CGNWIJFI.lean.js
similarity index 99%
rename from assets/guide_namespaced.md.EtgPGufb.lean.js
rename to assets/guide_namespaced.md.CGNWIJFI.lean.js
index 8d933ec5..5f26530c 100644
--- a/assets/guide_namespaced.md.EtgPGufb.lean.js
+++ b/assets/guide_namespaced.md.CGNWIJFI.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as t,o as n}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Namespaced Usage","description":"","frontmatter":{},"headers":[],"relativePath":"guide/namespaced.md","filePath":"guide/namespaced.md","lastUpdated":1732061061000}'),e={name:"guide/namespaced.md"};function l(p,s,h,k,d,r){return n(),a("div",null,s[0]||(s[0]=[t(`

Namespaced Usage

The default export of vue-types exposes an ES6 class object that mimics React prop-type.

The class object exposes both native and custom validators.

Native Validators

Native validators are exposed as static getter factories:

js
import VueTypes from 'vue-types'
+import{_ as i,c as a,a0 as t,o as n}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Namespaced Usage","description":"","frontmatter":{},"headers":[],"relativePath":"guide/namespaced.md","filePath":"guide/namespaced.md","lastUpdated":1733027442000}'),e={name:"guide/namespaced.md"};function l(p,s,h,k,d,r){return n(),a("div",null,s[0]||(s[0]=[t(`

Namespaced Usage

The default export of vue-types exposes an ES6 class object that mimics React prop-type.

The class object exposes both native and custom validators.

Native Validators

Native validators are exposed as static getter factories:

js
import VueTypes from 'vue-types'
 
 export default {
   props: {
diff --git a/assets/guide_troubleshooting.md.wcse0jpO.js b/assets/guide_troubleshooting.md.BzcUq6JT.js
similarity index 97%
rename from assets/guide_troubleshooting.md.wcse0jpO.js
rename to assets/guide_troubleshooting.md.BzcUq6JT.js
index b94e5516..f6d018fd 100644
--- a/assets/guide_troubleshooting.md.wcse0jpO.js
+++ b/assets/guide_troubleshooting.md.BzcUq6JT.js
@@ -1 +1 @@
-import{_ as r,c as t,a0 as o,o as a}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"guide/troubleshooting.md","filePath":"guide/troubleshooting.md","lastUpdated":1732061061000}'),i={name:"guide/troubleshooting.md"};function s(l,e,u,n,p,d){return a(),t("div",null,e[0]||(e[0]=[o('

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

',7)]))}const f=r(i,[["render",s]]);export{c as __pageData,f as default}; +import{_ as r,c as t,a0 as o,o as a}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"guide/troubleshooting.md","filePath":"guide/troubleshooting.md","lastUpdated":1733027442000}'),i={name:"guide/troubleshooting.md"};function s(l,e,u,n,p,d){return a(),t("div",null,e[0]||(e[0]=[o('

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

',7)]))}const f=r(i,[["render",s]]);export{c as __pageData,f as default}; diff --git a/assets/guide_troubleshooting.md.wcse0jpO.lean.js b/assets/guide_troubleshooting.md.BzcUq6JT.lean.js similarity index 97% rename from assets/guide_troubleshooting.md.wcse0jpO.lean.js rename to assets/guide_troubleshooting.md.BzcUq6JT.lean.js index b94e5516..f6d018fd 100644 --- a/assets/guide_troubleshooting.md.wcse0jpO.lean.js +++ b/assets/guide_troubleshooting.md.BzcUq6JT.lean.js @@ -1 +1 @@ -import{_ as r,c as t,a0 as o,o as a}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"guide/troubleshooting.md","filePath":"guide/troubleshooting.md","lastUpdated":1732061061000}'),i={name:"guide/troubleshooting.md"};function s(l,e,u,n,p,d){return a(),t("div",null,e[0]||(e[0]=[o('

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

',7)]))}const f=r(i,[["render",s]]);export{c as __pageData,f as default}; +import{_ as r,c as t,a0 as o,o as a}from"./chunks/framework.D25Vw4RT.js";const c=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"guide/troubleshooting.md","filePath":"guide/troubleshooting.md","lastUpdated":1733027442000}'),i={name:"guide/troubleshooting.md"};function s(l,e,u,n,p,d){return a(),t("div",null,e[0]||(e[0]=[o('

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

',7)]))}const f=r(i,[["render",s]]);export{c as __pageData,f as default}; diff --git a/assets/guide_validators.md.BUc5SOYS.js b/assets/guide_validators.md.Blofy_mW.js similarity index 99% rename from assets/guide_validators.md.BUc5SOYS.js rename to assets/guide_validators.md.Blofy_mW.js index df1233d1..ec1b29c5 100644 --- a/assets/guide_validators.md.BUc5SOYS.js +++ b/assets/guide_validators.md.Blofy_mW.js @@ -1,4 +1,4 @@ -import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Validators","description":"","frontmatter":{"title":"Validators"},"headers":[],"relativePath":"guide/validators.md","filePath":"guide/validators.md","lastUpdated":1732061061000}'),p={name:"guide/validators.md"};function e(l,s,h,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Using VueTypes Validators

VueTypes is a collection of prop validators. Each validator is basically a factory function returning an object (validator object) compatible with Vue prop validation.

Differently from simple Vue prop validation objects, VueTypes prop validator objects provide some additional chainable properties and methods to control things like required and default values.

Validators can be imported as named functions from vue-types:

js
import Vue from 'vue'
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Validators","description":"","frontmatter":{"title":"Validators"},"headers":[],"relativePath":"guide/validators.md","filePath":"guide/validators.md","lastUpdated":1733027442000}'),p={name:"guide/validators.md"};function e(l,s,h,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Using VueTypes Validators

VueTypes is a collection of prop validators. Each validator is basically a factory function returning an object (validator object) compatible with Vue prop validation.

Differently from simple Vue prop validation objects, VueTypes prop validator objects provide some additional chainable properties and methods to control things like required and default values.

Validators can be imported as named functions from vue-types:

js
import Vue from 'vue'
 import { number, oneOf } from 'vue-types'
 
 export default {
diff --git a/assets/guide_validators.md.BUc5SOYS.lean.js b/assets/guide_validators.md.Blofy_mW.lean.js
similarity index 99%
rename from assets/guide_validators.md.BUc5SOYS.lean.js
rename to assets/guide_validators.md.Blofy_mW.lean.js
index df1233d1..ec1b29c5 100644
--- a/assets/guide_validators.md.BUc5SOYS.lean.js
+++ b/assets/guide_validators.md.Blofy_mW.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Validators","description":"","frontmatter":{"title":"Validators"},"headers":[],"relativePath":"guide/validators.md","filePath":"guide/validators.md","lastUpdated":1732061061000}'),p={name:"guide/validators.md"};function e(l,s,h,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Using VueTypes Validators

VueTypes is a collection of prop validators. Each validator is basically a factory function returning an object (validator object) compatible with Vue prop validation.

Differently from simple Vue prop validation objects, VueTypes prop validator objects provide some additional chainable properties and methods to control things like required and default values.

Validators can be imported as named functions from vue-types:

js
import Vue from 'vue'
+import{_ as i,c as a,a0 as n,o as t}from"./chunks/framework.D25Vw4RT.js";const E=JSON.parse('{"title":"Validators","description":"","frontmatter":{"title":"Validators"},"headers":[],"relativePath":"guide/validators.md","filePath":"guide/validators.md","lastUpdated":1733027442000}'),p={name:"guide/validators.md"};function e(l,s,h,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

Using VueTypes Validators

VueTypes is a collection of prop validators. Each validator is basically a factory function returning an object (validator object) compatible with Vue prop validation.

Differently from simple Vue prop validation objects, VueTypes prop validator objects provide some additional chainable properties and methods to control things like required and default values.

Validators can be imported as named functions from vue-types:

js
import Vue from 'vue'
 import { number, oneOf } from 'vue-types'
 
 export default {
diff --git a/assets/index.md.BXX8PSRi.js b/assets/index.md.Ukn7pk88.js
similarity index 98%
rename from assets/index.md.BXX8PSRi.js
rename to assets/index.md.Ukn7pk88.js
index aa4ea407..e80b2a2f 100644
--- a/assets/index.md.BXX8PSRi.js
+++ b/assets/index.md.Ukn7pk88.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const o=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1732061061000}'),p={name:"index.md"};function t(l,s,h,k,r,E){return e(),a("div",null,s[0]||(s[0]=[n(`

VueTypes

VueTypes is a collection of configurable prop validators for Vue.js, inspired by React prop-types.

Try it now!

VERSION NOTE

This is the documentation for VueTypes 2 and above. If you are using an older version, refer to the documentation here.

Starting from v4, vue-types is compatible with both vue@2 and vue@3.

When to use

While basic prop validation in Vue.js is straight-forward and convenient, fine-grained validation can become verbose on complex components.

VueTypes offers a compact and fluent interface to define your project's props.

Usage example

Imagine a typical Vue.js component with a set of props:

js
export default {
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const o=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1733027442000}'),p={name:"index.md"};function t(l,s,h,k,r,E){return e(),a("div",null,s[0]||(s[0]=[n(`

VueTypes

VueTypes is a collection of configurable prop validators for Vue.js, inspired by React prop-types.

Try it now!

VERSION NOTE

This is the documentation for VueTypes 2 and above. If you are using an older version, refer to the documentation here.

Starting from v4, vue-types is compatible with both vue@2 and vue@3.

When to use

While basic prop validation in Vue.js is straight-forward and convenient, fine-grained validation can become verbose on complex components.

VueTypes offers a compact and fluent interface to define your project's props.

Usage example

Imagine a typical Vue.js component with a set of props:

js
export default {
   props: {
     id: {
       type: Number,
diff --git a/assets/index.md.BXX8PSRi.lean.js b/assets/index.md.Ukn7pk88.lean.js
similarity index 98%
rename from assets/index.md.BXX8PSRi.lean.js
rename to assets/index.md.Ukn7pk88.lean.js
index aa4ea407..e80b2a2f 100644
--- a/assets/index.md.BXX8PSRi.lean.js
+++ b/assets/index.md.Ukn7pk88.lean.js
@@ -1,4 +1,4 @@
-import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const o=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1732061061000}'),p={name:"index.md"};function t(l,s,h,k,r,E){return e(),a("div",null,s[0]||(s[0]=[n(`

VueTypes

VueTypes is a collection of configurable prop validators for Vue.js, inspired by React prop-types.

Try it now!

VERSION NOTE

This is the documentation for VueTypes 2 and above. If you are using an older version, refer to the documentation here.

Starting from v4, vue-types is compatible with both vue@2 and vue@3.

When to use

While basic prop validation in Vue.js is straight-forward and convenient, fine-grained validation can become verbose on complex components.

VueTypes offers a compact and fluent interface to define your project's props.

Usage example

Imagine a typical Vue.js component with a set of props:

js
export default {
+import{_ as i,c as a,a0 as n,o as e}from"./chunks/framework.D25Vw4RT.js";const o=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"title":"Introduction"},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1733027442000}'),p={name:"index.md"};function t(l,s,h,k,r,E){return e(),a("div",null,s[0]||(s[0]=[n(`

VueTypes

VueTypes is a collection of configurable prop validators for Vue.js, inspired by React prop-types.

Try it now!

VERSION NOTE

This is the documentation for VueTypes 2 and above. If you are using an older version, refer to the documentation here.

Starting from v4, vue-types is compatible with both vue@2 and vue@3.

When to use

While basic prop validation in Vue.js is straight-forward and convenient, fine-grained validation can become verbose on complex components.

VueTypes offers a compact and fluent interface to define your project's props.

Usage example

Imagine a typical Vue.js component with a set of props:

js
export default {
   props: {
     id: {
       type: Number,
diff --git a/guide/configuration.html b/guide/configuration.html
index fe7752a0..7770e88c 100644
--- a/guide/configuration.html
+++ b/guide/configuration.html
@@ -13,7 +13,7 @@
     
     
     
-    
+    
     
     
   
@@ -27,8 +27,8 @@
 VueTypes.config === config

Configuration Options

  • silent: (boolean, default false) set to true to prevent VueTypes from logging validation warnings.

TIP

Until version 2, VueTypes warning behavior was matching the Vue.config.silent global config parameter. But that global property has been removed in Vue@3.

To reproduce that behavior in application running Vue@2 you can use:

ts
import { config } from 'vue-types'
 import Vue from 'vue'
 
-config.silent = Vue.config.silent
  • logLevel: (string, default warn) allows choosing which console method will be used to display validation errors. Available options are log, warn, error, debug andinfo.
- +config.silent = Vue.config.silent
  • logLevel: (string, default warn) allows choosing which console method will be used to display validation errors. Available options are log, warn, error, debug andinfo.
+ \ No newline at end of file diff --git a/guide/installation.html b/guide/installation.html index 953d4043..ae7eff4e 100644 --- a/guide/installation.html +++ b/guide/installation.html @@ -13,7 +13,7 @@ - + @@ -87,8 +87,8 @@ vueTypes: { shim: true, }, -}
- +}
+ \ No newline at end of file diff --git a/guide/namespaced.html b/guide/namespaced.html index 2ef14c12..ff58d69a 100644 --- a/guide/namespaced.html +++ b/guide/namespaced.html @@ -13,7 +13,7 @@ - + @@ -99,8 +99,8 @@ // this password prop must include at least a digit password: passwordType.validate((v) => /[0-9]/test.(v)), }, -} - +} + \ No newline at end of file diff --git a/guide/troubleshooting.html b/guide/troubleshooting.html index 27b8c2c4..7c064902 100644 --- a/guide/troubleshooting.html +++ b/guide/troubleshooting.html @@ -13,13 +13,13 @@ - + -
Skip to content

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

- +
Skip to content

Troubleshooting

ESLint reports a vue/require-default-prop error for certain vue-types validators.

If your uses eslint-plugin-vue v6 or lower, you might receive a linting error related to the vue/require-default-prop rule for validators using the .isRequired or .loose flag (see vue-types#179).

The best solution to fix this issue is to upgrade the library eslint-plugin-vue to v7.

However, if you cannot upgrade the library, you can install eslint-plugin-vue-types. The plugin extends eslint-plugin-vue and filters out most incorrectly flagged usage cases.

Read the plugin documentation for installation and usage details.

+ \ No newline at end of file diff --git a/guide/validators.html b/guide/validators.html index 1f777b28..46cfe669 100644 --- a/guide/validators.html +++ b/guide/validators.html @@ -13,7 +13,7 @@ - + @@ -268,8 +268,8 @@ validateType(Number, 10) // true // returns an error message on failure -validateType(String, 10, false) // 'value "10" should be of type "string"`

toType / toValidableType

Convert an object compatible with Vue.js prop validation to a VueTypes validator object.

See Standalone custom validators for more details.

fromType

Creates a new validator object from a previously defined one.

See Inheriting from existing validators for more details.

createTypes

Returns a namespaced collection of validators.

See Custom namespaced instance for more details.

- +validateType(String, 10, false) // 'value "10" should be of type "string"`

toType / toValidableType

Convert an object compatible with Vue.js prop validation to a VueTypes validator object.

See Standalone custom validators for more details.

fromType

Creates a new validator object from a previously defined one.

See Inheriting from existing validators for more details.

createTypes

Returns a namespaced collection of validators.

See Custom namespaced instance for more details.

+ \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index a5e837b9..1d49d9d5 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"advanced_custom-instance.md":"VAIxW2UG","advanced_extending-vue-types.md":"DKUpT8Vz","advanced_typescript.md":"BozNiqGA","guide_configuration.md":"Bua8Nzk_","guide_installation.md":"CCNB_j3-","guide_namespaced.md":"EtgPGufb","guide_troubleshooting.md":"wcse0jpO","guide_validators.md":"BUc5SOYS","index.md":"BXX8PSRi"} +{"advanced_custom-instance.md":"COUMKz6y","advanced_extending-vue-types.md":"CHWEadSg","advanced_typescript.md":"Bs5asQQh","guide_configuration.md":"CtRJqKbi","guide_installation.md":"NcEiVHpN","guide_namespaced.md":"CGNWIJFI","guide_troubleshooting.md":"BzcUq6JT","guide_validators.md":"Blofy_mW","index.md":"Ukn7pk88"} diff --git a/index.html b/index.html index 3a761371..8aa3643b 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + @@ -64,8 +64,8 @@ methods: { // ... }, -} - +} + \ No newline at end of file