Open alex-knyazev opened 4 years ago
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:
https://github.com/ant-design/ant-design/issues/20878
Reproduction, where we can see the behaviour I've described
https://github.com/alex-knyazev/antd-validation-bug-reproduction
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
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:
https://github.com/ant-design/ant-design/issues/20878
Reproduction, where we can see the behaviour I've described
https://github.com/alex-knyazev/antd-validation-bug-reproduction