Skip to content

Commit

Permalink
fix(antd/next): fix form step next validate can not prevent custom er…
Browse files Browse the repository at this point in the history
…rors (#3016)
  • Loading branch information
janryWang authored Apr 6, 2022
1 parent 35d58b2 commit 9e7a498
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/antd/src/form-step/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ const createFormStep = (defaultCurrent = 0): IFormStep => {
async next() {
try {
await env.form.validate()
next()
if (env.form.valid) {
next()
}
} catch {}
},
async back() {
Expand Down
4 changes: 3 additions & 1 deletion packages/next/src/form-step/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ const createFormStep = (defaultCurrent = 0): IFormStep => {
async next() {
try {
await env.form.validate()
next()
if (env.form.valid) {
next()
}
} catch {}
},
async back() {
Expand Down

0 comments on commit 9e7a498

Please sign in to comment.