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

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

Closed
ludovitkapusta opened this issue Dec 6, 2018 · 0 comments

Comments

@ludovitkapusta
Copy link
Contributor

ludovitkapusta commented Dec 6, 2018

Environment

  • OS: macOS 10.14.1
  • Node: 8.11.1
  • NPM: 5.8.0
  • react-advanaced-form: 1.6.2

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:

  • check second checkbox, fill second input -> do submit -> submit occured
  • uncheck second checkbox, empty second input, check first checkbox, fill first input -> do submit -> submit didnt happen
    https://codesandbox.io/s/pp1l8j2j90
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