Open fdlk opened 5 years ago
Create a form with two required fields a and b. Let the validator for b be ({a, b}) => (a && b && a === b) | false Play with the form
({a, b}) => (a && b && a === b) | false
Field b is valid when it's filled in and equal to b. Validation is re-evaluated whenever you change a or b.
Validation function gets called too little and ends up in a state where the field is either valid or invalid and you cannot fix it anymore.
Ran into this when working on https://github.com/molgenis/molgenis-frontend/pull/33
How to Reproduce
Create a form with two required fields a and b. Let the validator for b be
({a, b}) => (a && b && a === b) | false
Play with the formExpected behavior
Field b is valid when it's filled in and equal to b. Validation is re-evaluated whenever you change a or b.
Observed behavior
Validation function gets called too little and ends up in a state where the field is either valid or invalid and you cannot fix it anymore.