vee-validate 2.1.0-beta.8 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/locale/ar.js +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ka.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/ms_MY.js +1 -1
- package/dist/locale/nb_NO.js +1 -1
- package/dist/locale/ne.js +1 -0
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nn_NO.js +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pt_BR.js +1 -1
- package/dist/locale/pt_PT.js +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sq.js +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr_Latin.js +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zh_CN.js +1 -1
- package/dist/locale/zh_TW.js +1 -1
- package/dist/rules.esm.js +162 -80
- package/dist/vee-validate.esm.js +3069 -2183
- package/dist/vee-validate.js +3166 -2279
- package/dist/vee-validate.min.js +1 -1
- package/dist/vee-validate.minimal.esm.js +2949 -2134
- package/dist/vee-validate.minimal.js +2854 -2041
- package/dist/vee-validate.minimal.min.js +1 -1
- package/dist/vue.js +10947 -0
- package/package.json +28 -28
- package/types/vee-validate.d.ts +18 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vee-validate",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Simple Vue.js input validation plugin",
|
|
5
5
|
"author": "Abdelrahman Awad <logaretm1@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,49 +38,49 @@
|
|
|
38
38
|
"types/*.d.ts"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.
|
|
42
|
-
"@babel/node": "^7.0.0
|
|
43
|
-
"@babel/plugin-transform-flow-strip-types": "^7.0.0
|
|
44
|
-
"@babel/preset-env": "^7.
|
|
45
|
-
"@commitlint/cli": "^7.
|
|
41
|
+
"@babel/core": "^7.1.2",
|
|
42
|
+
"@babel/node": "^7.0.0",
|
|
43
|
+
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
|
|
44
|
+
"@babel/preset-env": "^7.1.0",
|
|
45
|
+
"@commitlint/cli": "^7.2.1",
|
|
46
46
|
"@vue/test-utils": "1.0.0-beta.12",
|
|
47
47
|
"babel-core": "^7.0.0-0",
|
|
48
|
-
"babel-eslint": "^
|
|
48
|
+
"babel-eslint": "^10.0.1",
|
|
49
49
|
"babel-jest": "^23.4.2",
|
|
50
50
|
"chalk": "^2.4.1",
|
|
51
51
|
"cross-env": "^5.2.0",
|
|
52
52
|
"date-fns": "2.0.0-alpha.7",
|
|
53
|
-
"eslint": "^5.
|
|
54
|
-
"eslint-config-standard": "^
|
|
55
|
-
"eslint-plugin-flowtype": "^2.
|
|
53
|
+
"eslint": "^5.8.0",
|
|
54
|
+
"eslint-config-standard": "^12.0.0",
|
|
55
|
+
"eslint-plugin-flowtype": "^3.2.0",
|
|
56
56
|
"eslint-plugin-import": "^2.14.0",
|
|
57
|
-
"eslint-plugin-jest": "^21.
|
|
58
|
-
"eslint-plugin-node": "^
|
|
59
|
-
"eslint-plugin-promise": "^
|
|
60
|
-
"eslint-plugin-standard": "^
|
|
57
|
+
"eslint-plugin-jest": "^21.27.1",
|
|
58
|
+
"eslint-plugin-node": "^8.0.0",
|
|
59
|
+
"eslint-plugin-promise": "^4.0.1",
|
|
60
|
+
"eslint-plugin-standard": "^4.0.0",
|
|
61
61
|
"filesize": "^3.6.1",
|
|
62
|
-
"flow-bin": "^0.
|
|
63
|
-
"flush-promises": "^1.0.
|
|
62
|
+
"flow-bin": "^0.85.0",
|
|
63
|
+
"flush-promises": "^1.0.2",
|
|
64
64
|
"gzip-size": "^5.0.0",
|
|
65
|
-
"husky": "^1.
|
|
65
|
+
"husky": "^1.1.3",
|
|
66
66
|
"jest": "^23.5.0",
|
|
67
|
-
"lint-staged": "^
|
|
67
|
+
"lint-staged": "^8.0.4",
|
|
68
68
|
"mkdirp": "^0.5.1",
|
|
69
69
|
"regenerator-runtime": "^0.12.1",
|
|
70
|
-
"rollup": "^0.
|
|
71
|
-
"rollup-plugin-buble": "^0.19.
|
|
72
|
-
"rollup-plugin-commonjs": "^9.
|
|
70
|
+
"rollup": "^0.67.0",
|
|
71
|
+
"rollup-plugin-buble": "^0.19.4",
|
|
72
|
+
"rollup-plugin-commonjs": "^9.2.0",
|
|
73
73
|
"rollup-plugin-flow": "^1.1.1",
|
|
74
|
-
"rollup-plugin-node-resolve": "^3.
|
|
75
|
-
"rollup-plugin-replace": "^2.
|
|
76
|
-
"uglify-js": "^3.4.
|
|
77
|
-
"validator": "^10.
|
|
74
|
+
"rollup-plugin-node-resolve": "^3.4.0",
|
|
75
|
+
"rollup-plugin-replace": "^2.1.0",
|
|
76
|
+
"uglify-js": "^3.4.9",
|
|
77
|
+
"validator": "^10.8.0",
|
|
78
78
|
"vue": "^2.5.17",
|
|
79
|
-
"vue-i18n": "^8.
|
|
80
|
-
"vue-jest": "^
|
|
79
|
+
"vue-i18n": "^8.3.0",
|
|
80
|
+
"vue-jest": "^3.0.0",
|
|
81
81
|
"vue-server-renderer": "^2.5.17",
|
|
82
82
|
"vue-template-compiler": "^2.5.17",
|
|
83
|
-
"vuepress": "^0.14.
|
|
83
|
+
"vuepress": "^0.14.4"
|
|
84
84
|
},
|
|
85
85
|
"eslintIgnore": [
|
|
86
86
|
"locale",
|
package/types/vee-validate.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import Vue = require("vue")
|
|
|
3
3
|
export interface VeeValidateComponentOptions {
|
|
4
4
|
validator?: 'new' | 'inherit';
|
|
5
5
|
name?: () => string;
|
|
6
|
-
value?: () =>
|
|
6
|
+
value?: () => any;
|
|
7
7
|
rejectsFalse?: boolean;
|
|
8
8
|
events?: string;
|
|
9
9
|
}
|
|
@@ -107,7 +107,7 @@ export class ErrorBag {
|
|
|
107
107
|
export class FieldBag {
|
|
108
108
|
items: Field[];
|
|
109
109
|
filter(matcher: {name?: string, scope?: string, id?: string}): Field[];
|
|
110
|
-
find(matcher: {name?: string, scope?: string, id?: string}): Field;
|
|
110
|
+
find(matcher: {name?: string, scope?: string, id?: string}): Field | undefined;
|
|
111
111
|
map(fn: Function): Field[];
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -121,6 +121,17 @@ export interface FieldMatchOptions {
|
|
|
121
121
|
name?: string;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
export interface VerifyResult {
|
|
125
|
+
valid: boolean;
|
|
126
|
+
errors: string[];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface VerifyOptions {
|
|
130
|
+
bails: boolean;
|
|
131
|
+
name: string;
|
|
132
|
+
values: { [x: string]: any };
|
|
133
|
+
}
|
|
134
|
+
|
|
124
135
|
export class Validator {
|
|
125
136
|
errors: ErrorBag;
|
|
126
137
|
fields: FieldBag;
|
|
@@ -147,9 +158,10 @@ export class Validator {
|
|
|
147
158
|
localize(rootDictionary?: Object) :void;
|
|
148
159
|
localize(language: string, dictionary?: Object) :void;
|
|
149
160
|
setStrictMode(strictMode?: boolean): void;
|
|
150
|
-
validate(name
|
|
161
|
+
validate(name?: string, value?: any, scope?: string, silent?: boolean): Promise<any>;
|
|
151
162
|
validateAll(values?: Object, scope?: string, silent?: boolean): Promise<any>;
|
|
152
163
|
validateScopes(silent?: boolean): Promise<any>;
|
|
164
|
+
verify(value: any, rules: string|Object, options?: VerifyOptions): Promise<VerifyResult>;
|
|
153
165
|
static create(validations: Object, options: any): Validator;
|
|
154
166
|
static extend(name: string, validator: Object|Function, options?:ExtendOptions): void;
|
|
155
167
|
static remove(name: string): void;
|
|
@@ -159,11 +171,12 @@ export class Validator {
|
|
|
159
171
|
}
|
|
160
172
|
|
|
161
173
|
export class ExtendOptions {
|
|
162
|
-
hasTarget?: boolean
|
|
174
|
+
hasTarget?: boolean;
|
|
175
|
+
paramNames?: string[];
|
|
163
176
|
}
|
|
164
177
|
|
|
165
178
|
export const version: string;
|
|
166
179
|
|
|
167
|
-
export const install: Vue.PluginFunction<
|
|
180
|
+
export const install: Vue.PluginFunction<Configuration>
|
|
168
181
|
|
|
169
182
|
export const directive: Vue.DirectiveOptions;
|