kettanaito / react-advanced-form

Functional reactive forms. Multi-layer validation, custom styling, field grouping, reactive props, and much more.
https://redd.gitbook.io/react-advanced-form
MIT License
217 stars 24 forks source link

Submit form stoped working if some of the field already been resulted as invalidated even if they are not required #350

Closed ludovitkapusta closed 5 years ago

ludovitkapusta commented 5 years ago

Environment

What

Submit form stoped working

Current behavior

Submit form stoped working after special user scenario. With usage of conditional (reactive) require

Expected behavior

Submit should work when live changing require prop

Why

Why do you think the issue occurs? It looks like form is resulting some inputs as invalidate, even if they are not required. Require is changing live by some other conditions

How

You have two inputs, two checkboxes. First input should be required if first checkbox is checked, second input should be required if second checkbox is checked. Exact steps are: