final-form / final-form/react-final-form

<Field> with InitialValue displays required validation error

Open
#658 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
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?

When componentDidMount() has no implementation, the form displays 'required' error message for required input even if initialValue is set to Field component; thus, form can't also be submitted,

### What is the expected behavior?
No 'required' validation message should be displayed and form can be submitted.

### Sandbox Link
Steps to reproduce:
https://codesandbox.io/s/react-final-form-simple-example-2l600

1. On the sandbox, comment the codes in componentDidMount()
2. Click the submit button.

Result:
1. 'Required' message appears
2. Form cannot be submitted

### What's your environment?
React-final-form: latest
Final Form: latest
OS: Windows
Browser: Chrome
Node JS: 10.15.3

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.