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

Problem with getting field errors at validateFieldsInternal method #363

Open
alex-knyazev opened this issue Jan 13, 2020 · 1 comment
Open

Comments

@alex-knyazev
Copy link

alex-knyazev commented Jan 13, 2020

https://github.com/react-component/form/blob/master/src/createBaseForm.js#L547

If we have array as a field value - we have an array in fieldErrors variables here, not an object with errors property.

But string below expects errors property in fieldErrors :
https://github.com/react-component/form/blob/master/src/createBaseForm.js#L555

I also created related issue un antd-design:

ant-design/ant-design#20878

Reproduction, where we can see the behaviour I've described

https://github.com/alex-knyazev/antd-validation-bug-reproduction

@alex-knyazev
Copy link
Author

alex-knyazev commented Jan 14, 2020

P.S.: I found solution only with using of async-validator lib and custom validator prop:

https://github.com/alex-knyazev/antd-validation-bug-reproduction/commit/f61be6fe316668c647769a1e89c2b2e26c4fbdd9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant