reactjsformsvalidationreact-final-formfinal-form

How to disable validation on form reset react-final-form?


I have custom validation in email input field, which is being triggered by form.reset(), which reset the form (After user successfully submit form).

I was wondering how to not trigger validation after user submit and reset the form?


Solution

  • I used following method to get rid of validation after successfully submission and resetting of the form.

    form.reset();
    form.resetFieldState('email');
    

    It's available under

    FormRenderProps > FormApi