final-form / final-form/react-final-form
Prevent field validation on form mount
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
**bug report**/**feature request**
### What is the current behavior?
field validation runs on mount of form
```javascript
validateRequiredEmail(value, 'investorEmail', 3)}
/>
```
the field behaves correctly, when error is not collected through
`error={this.props.error || this.props.meta?.error}` but only `this.props.error`, but I would like not to have these hacks in my code. Is there elegant solution?
### What is the expected behavior?
prevent validation from running on the first render
can be acomplished by
validate={(value, values, meta) => meta.touched && validateRequiredEmail(value, 'investorEmail', 3)} , but then doesn't validate on form submit
Contributor guide
Assessment
This issue has not been assessed yet.