Open samsch opened 5 years ago
Oh dear, so this bug has been around since March?
I just ran into this as well and was about to submit a new issue when I saw this existing issue.
Here is my reproduction, which is using the latest versions of everything (react-final-form
6.3.0): https://codesandbox.io/s/react-final-form-html5-validation-13-y1uqs
(Looks like this doesn't manifest itself when using "plain" Field
from react-final-form
: https://codesandbox.io/s/react-final-form-html5-validation-13-p80id)
Are there any good workarounds?
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.