Skip to content

Commit

Permalink
chore: async-validator => @rc-component/async-validator
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Oct 16, 2023
1 parent 45b959f commit 5cf31ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open http://localhost:8000
## Feature

- Support react.js and even react-native
- Validate fields with [async-validator](https://github.com/yiminghe/async-validator/)
- Validate fields with [@rc-component/async-validator](https://github.com/react-component/async-validator/)

## Install

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"react-dom": ">=16.9.0"
},
"dependencies": {
"@babel/runtime": "^7.18.0",
"async-validator": "^4.1.0",
"rc-util": "^5.32.2"
"@babel/runtime": "^7.23.2",
"@rc-component/async-validator": "^5.0.0",
"rc-util": "^5.38.0"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/validateUtil.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RawAsyncValidator from 'async-validator';
import RawAsyncValidator from '@rc-component/async-validator';
import * as React from 'react';
import warning from 'rc-util/lib/warning';
import type {
Expand Down Expand Up @@ -36,7 +36,7 @@ async function validateRule(
): Promise<string[]> {
const cloneRule = { ...rule };

// Bug of `async-validator`
// Bug of `@rc-component/async-validator`
// https://github.com/react-component/field-form/issues/316
// https://github.com/react-component/field-form/issues/313
delete (cloneRule as any).ruleIndex;
Expand Down Expand Up @@ -116,7 +116,7 @@ async function validateRule(
}

/**
* We use `async-validator` to validate the value.
* We use `@rc-component/async-validator` to validate the value.
* But only check one value in a time to avoid namePath validate issue.
*/
export function validateRules(
Expand Down

0 comments on commit 5cf31ea

Please sign in to comment.