Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js error don't show obviously inside antd's form component validator #26382

Closed
1 task done
lcl22hope opened this issue Aug 25, 2020 · 5 comments
Closed
1 task done

js error don't show obviously inside antd's form component validator #26382

lcl22hope opened this issue Aug 25, 2020 · 5 comments
Labels
3.x 3.x stable issue or bug fix, PR should be cherry-pick to master

Comments

@lcl22hope
Copy link

lcl22hope commented Aug 25, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

open demo, click 'Register' Button, the JS error which inside form.Item's validator don't show in web browser console.

What is expected?

I think such these errors or warning should not be caught inside form component, if this behavior exists, our developer may waste much time in debugging those problems.

What is actually happening?

js error inside validator function, don't show obviously

Environment Info
antd 3.26.18
React ^16.9.25
System Mac OS
Browser Chrome version 84.0.4147.135 (Official Build) (64-bit)
@afc163
Copy link
Member

afc163 commented Aug 25, 2020

@afc163
Copy link
Member

afc163 commented Aug 25, 2020

@zombieJ Any chance to throw error without try catch? It is confused for developers.

@afc163
Copy link
Member

afc163 commented Aug 25, 2020

Duplicate of #10718

@afc163 afc163 marked this as a duplicate of #10718 Aug 25, 2020
@zombieJ
Copy link
Member

zombieJ commented Aug 25, 2020

We do not maintain v3 any longer. Pls upgrade to v4 instead. New Form support to show error in console:

截屏2020-08-25 下午3 10 35

ref: https://codesandbox.io/s/objective-cannon-f8qh3?file=/index.js

@zombieJ zombieJ closed this as completed Aug 25, 2020
@zombieJ zombieJ added the 3.x 3.x stable issue or bug fix, PR should be cherry-pick to master label Aug 25, 2020
@lcl22hope
Copy link
Author

upgrade

Thx for your reply, by the way, to upgrade antd version is a great solution for this case. But our project exits for many years, It's hard to just upgrade antd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x 3.x stable issue or bug fix, PR should be cherry-pick to master
Projects
None yet
Development

No branches or pull requests

3 participants