📋 Validation resolvers: Yup, Zod, Superstruct, Joi, Vest, Class Validator, io-ts, Nope, computed-types, typanion, Ajv, TypeBox, ArkType, Valibot, effect-ts and VineJS
1.67k
stars
151
forks
source link
AJV resolver is async mode is not working #665
Open
denyskublytskyi opened 4 months ago
Describe the bug The Async mode for AJV is not working. It's not handling promise here https://github.com/react-hook-form/resolvers/blob/master/ajv/src/ajv.ts#L71
https://ajv.js.org/guide/async-validation.html
To Reproduce Steps to reproduce the behavior:
Codesandbox link (Required) Include a codesandbox will help us to investigate the issue quicker.
https://codesandbox.io/p/sandbox/react-hook-form-validationschema-v6-2l77g
Expected behavior Error message for field instead of the uncaught error.
Screenshots
Desktop (please complete the following information):
Additional context https://github.com/react-hook-form/resolvers/blob/master/ajv/src/ajv.ts#L71
Fix: