react-redux-form icon indicating copy to clipboard operation
react-redux-form copied to clipboard

RRF validates against pre-parsed value rather than parsed value

Open Gidgidonihah opened this issue 7 years ago • 0 comments

The Problem

The validators don't seem to take the parser into account

Steps to Reproduce

Create a number input with a max of 99 and a parser that only ever allows 2 numbers. If you press 123 while focused on the input, the input will show 12 as the value, but the form will be invalid.

Expected Behavior

The form should validate using the parsed result

Actual Behavior

The form appears to validate using the last input, rather than the parsed result from the last input.

Reproducible Code Example

https://codepen.io/Gidgidonihah/pen/pVVaNg

Note that the button is disabled when the form is invalid and the disabled button is red. If you remove the disabled line. Also note that change is not triggered on the form after the 3 is pressed.

Gidgidonihah avatar May 11 '18 19:05 Gidgidonihah