final-form / final-form/react-final-form

`form.pauseValidation` is not working

Open
#879 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?

Bug

### What is the current behavior?

`form.pauseValidation` is not working.
It seems to be that react-final-form is calling `form.resumeValidation` after the fields are rendered
https://github.com/final-form/react-final-form/blob/92cd23e237b43d1dd8e5598381ab58ae8f97f9ed/src/ReactFinalForm.js#L93
since it called `form.pauseValidation` initially
https://github.com/final-form/react-final-form/blob/92cd23e237b43d1dd8e5598381ab58ae8f97f9ed/src/ReactFinalForm.js#L72
but it's disregarding if anyone had called `pauseValidation` in the meantime.

### What is the expected behavior?

Creating a custom `form` and calling `form.pauseValidation` should pause the validation.

### Sandbox Link

https://codesandbox.io/s/new-star-vcrxo

### What's your environment?

react-final-form:6.5.2
final-form:4.20.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.