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

Programmatically setting fields to valid values still shows validation error.

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

Description

### bug report

### What is the current behavior?

Programmatically set html5 validated fields don't get set to valid.

### What is the expected behavior?

Valid programmatically set values should be validated as valid.

### Sandbox Link
https://codesandbox.io/s/m4woxw1xv8

First attempt to submit, which gives a validation error.
Hit "Programmatically set name field" (notice in FF the field is outline in red).
Hit Submit again, and notice the field still gives a validation error.

To make the field vaild, you must directly edit the field.

This also seems to apply to browser autofilled fields, but maybe only some of the time? (I'm not sure I can reproduce this consistently.)

### What's your environment?
Latest (2019-03-29) FF, RFF, RFF HTML5 Validation, React, ReactDOM.
Tested in Firefox 66.0.1 and Chrome 73.0.3683.86 (64-bit) on Xubuntu 18.04.

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.