React-final-form | Form field validation with external field dependencies

197 views Asked by At

I have a problem on my current MVC (DotNet) application.

My form is render with classic MVC and inside it another "form" with react-final-form.

I need to validate a field in my react form base on a field rendered in the MVC form (so outside react-final-form). When the MVC field change, i would like to trigger the validate function in the react form.

Here is a codesandbox with the problem : https://codesandbox.io/s/validation-with-external-dependencies-g67d8

To reproduce, just check the Required checkbox and submit. Normally, this should fail. But as the validation is not triggered after the checkbox change, the react form is not aware of this change.

Thanks in advance for your help.

0

There are 0 answers