redux-form/redux-form
在 GitHub 查看Field validation inconsistent when having mounted/unmounted a field
Open
#4,061 创建于 2018年6月7日
Version 7bugc:field-level-validationhelp wanted
描述
Are you submitting a bug report or a feature request?
A bug report
What is the current behavior?
When submiting a form after having unmounted/mounted an input field, the fields' validation isn't triggered if you submit the form without having changed the value of the field
What is the expected behavior?
All fields within the component should be validated when clicking submit.
Sandbox Link
In this example there's an input field that requires a value. The first time you click 'show input' and try to submit the form the validation works as expected. However once you hide and show the input field (by using the checkbox), and then submit the form without changing value, the form submits without validating the field: https://codesandbox.io/s/zn8z9z52p
What's your environment?
React 15.5.3 Redux 3.7.0 Redux-form 7.3.0 (& 7.4.2) Chrome 67.0.3396.79