We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
let valid = false; if (resolverOptions?.mode === 'sync') { valid = validate(values); } else { try { valid = await validate(values); } catch (e) { if (e instanceof Ajv.ValidationError) { validate.errors = e.errors as DefinedError[]; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: