molgenis / molgenis-ui-form

Library for generating HTML web forms
GNU Lesser General Public License v3.0
0 stars 10 forks source link

Validation does not trigger often enough #266

Open fdlk opened 5 years ago

fdlk commented 5 years ago

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 form

Expected 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.

fdlk commented 5 years ago

Ran into this when working on https://github.com/molgenis/molgenis-frontend/pull/33