You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using yup resolver, ref property in errors object doesn't contain the HTML element, but contains some object with metadata related to that field's validation. When not using yup, ref property contains the actual HTML element.
Observe errors object that is logged and notice how isTosAccepted object ref property contains some metadata and not the actual HTML input element like other fields
Expected behavior
When using yup resolver, errors object should contain ref to checkbox input when it's present in a form and validated. Validation without yup resolver contains ref to the checkbox input and I would expect resolver behavior to match the library default one.
Screenshots
Errors object without using yup resolver. Notice how ref is actually the HTML input checkbox.
Errors object when using yup resolver. Notice how ref doesn't contain the HTML input checkbox.
Desktop (please complete the following information):
OS: [Windows]
Browser [Firefox, Chrome]
Version [Firefox 117, Chrome 116]
Smartphone (please complete the following information):
Haven't tested on a smartphone.
Additional context
I haven't tested with other resolvers from this library.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using yup resolver,
ref
property in errors object doesn't contain the HTML element, but contains some object with metadata related to that field's validation. When not using yup,ref
property contains the actual HTML element.Basic text input is not affected by this.
To Reproduce
Steps to reproduce the behavior:
isTosAccepted
objectref
property contains some metadata and not the actual HTML input element like other fieldsLibrary versions:
@hookform/resolvers - v3.0.0
react-hook-form - v7.43.9
Codesandbox link (Required)
https://codesandbox.io/p/sandbox/dazzling-butterfly-zs8899?file=/src/App.tsx
Expected behavior
When using yup resolver, errors object should contain ref to checkbox input when it's present in a form and validated. Validation without yup resolver contains ref to the checkbox input and I would expect resolver behavior to match the library default one.
Screenshots
Errors object without using yup resolver. Notice how ref is actually the HTML input checkbox.
Errors object when using yup resolver. Notice how ref doesn't contain the HTML input checkbox.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Haven't tested on a smartphone.
Additional context
I haven't tested with other resolvers from this library.
The text was updated successfully, but these errors were encountered: