Skip to content

Commit c6a1edc

Browse files
committed
fix: removed default export in rules pkg closes #4470
1 parent c372718 commit c6a1edc

File tree

3 files changed

+6
-34
lines changed

3 files changed

+6
-34
lines changed

.changeset/ten-dolls-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@vee-validate/rules': patch
3+
---
4+
5+
"fix: removed default export in rules pkg closes #4470"

docs/src/pages/guide/global-validators.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Or you can globally define all the available rules in the `@vee-validate/rules`
262262

263263
```js
264264
import { defineRule } from 'vee-validate';
265-
import AllRules from '@vee-validate/rules';
265+
import * as AllRules from '@vee-validate/rules';
266266

267267
Object.keys(AllRules).forEach(rule => {
268268
defineRule(rule, AllRules[rule]);

packages/rules/src/index.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable camelcase */
22

3-
import { ValidationRuleFunction } from '../../shared';
43
import alpha from './alpha';
54
import alpha_dash from './alpha_dash';
65
import alpha_num from './alpha_num';
@@ -60,35 +59,3 @@ export {
6059
url,
6160
toTypedSchema,
6261
};
63-
64-
const all: Record<string, ValidationRuleFunction<unknown, any>> = {
65-
alpha_dash,
66-
alpha_num,
67-
alpha_spaces,
68-
alpha,
69-
between,
70-
confirmed,
71-
digits,
72-
dimensions,
73-
email,
74-
ext,
75-
image,
76-
integer,
77-
is_not,
78-
is,
79-
length,
80-
max_value,
81-
max,
82-
mimes,
83-
min_value,
84-
min,
85-
not_one_of,
86-
numeric,
87-
one_of,
88-
regex,
89-
required,
90-
size,
91-
url,
92-
};
93-
94-
export default all;

0 commit comments

Comments
 (0)