Skip to content

Commit

Permalink
fix: removed default export in rules pkg closes #4470
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Sep 13, 2023
1 parent c372718 commit c6a1edc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-dolls-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vee-validate/rules': patch
---

"fix: removed default export in rules pkg closes #4470"
2 changes: 1 addition & 1 deletion docs/src/pages/guide/global-validators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Or you can globally define all the available rules in the `@vee-validate/rules`

```js
import { defineRule } from 'vee-validate';
import AllRules from '@vee-validate/rules';
import * as AllRules from '@vee-validate/rules';

Object.keys(AllRules).forEach(rule => {
defineRule(rule, AllRules[rule]);
Expand Down
33 changes: 0 additions & 33 deletions packages/rules/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable camelcase */

import { ValidationRuleFunction } from '../../shared';
import alpha from './alpha';
import alpha_dash from './alpha_dash';
import alpha_num from './alpha_num';
Expand Down Expand Up @@ -60,35 +59,3 @@ export {
url,
toTypedSchema,
};

const all: Record<string, ValidationRuleFunction<unknown, any>> = {
alpha_dash,
alpha_num,
alpha_spaces,
alpha,
between,
confirmed,
digits,
dimensions,
email,
ext,
image,
integer,
is_not,
is,
length,
max_value,
max,
mimes,
min_value,
min,
not_one_of,
numeric,
one_of,
regex,
required,
size,
url,
};

export default all;

0 comments on commit c6a1edc

Please sign in to comment.