final-form / final-form/react-final-form-html5-validation

Field continues to be required even after changing required prop to false

Open
#19 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
56
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?

Bug report

### What is the current behavior?

If `required` prop is initially `true`, then the validate function continues to require the field to be filled in, even if you later change the `required` prop to `false`.

### What is the expected behavior?

As soon as `required` prop changes, validation checks should reflect that that. So if you change it to `false`, the field should no longer be required.

### Sandbox Link

https://codesandbox.io/s/react-final-form-html5-validation-example-n2q8d

### Other information

Likely related to #13

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.