Async validate prop always skips HTML5 validations

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Inspect src/Html5ValidationField.js around lines 66-72 and reproduce the issue with a Field that receives an async validate prop. Confirm that the async validation result is resolved and used before the HTML5 validations run; done means both validation paths are checked in that order.

Written by the indexing model from the issue text.

Description

Are you submitting a bug report or a feature request?

Bug

What is the current behavior?

If you pass in an async validate prop to Field, the HTML5 validations are never checked (because of this code).

What is the expected behavior?

The async validation will be resolved and used before continuing to the HTML5 validations.

Dominant language
TypeScript
Stars
56
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from final-form/react-final-form-html5-validation

All issues in final-form/react-final-form-html5-validation

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.