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 I am trying to connect a SemanticUI controlled component to the hook-form lib. I am using
useEffect(() => { register({ name: "somename" }, { required: true }) }, []) const onChange = (e) => { setValue("somename", e.target.value) }
to connect it.
However, the validation behaves in a weird way:
To Reproduce Minimal example: https://codesandbox.io/s/rough-pine-p8ypz?fontsize=14
Expected behavior Validation should work after:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
hey @breytex,
Thanks for the detailed issue reporting :)
because you registered that input manually instead of
<input ref={regsiter} />
so react hook form will not have the reference with the input ref when you start to type in the input, It wouldn't re-validate itself.
ref
input
with setError you can set error and clear manually
setError
const handleChange = (e) => { if (e.target.value) { setError('test'); } } <input onChange={handleChange} />
or
triggerValidation({ name: 'test', value: e.target.value, })
https://codesandbox.io/s/beautiful-hertz-ert5m
Sorry, something went wrong.
hey @breytex
just a quick follow up on this issue, how u doing with it?
cheers bill
going to close this issue, for now, feel free to reopen if you still have question 👍
No branches or pull requests
Describe the bug
I am trying to connect a SemanticUI controlled component to the hook-form lib.
I am using
to connect it.
However, the validation behaves in a weird way:
To Reproduce
Minimal example:
https://codesandbox.io/s/rough-pine-p8ypz?fontsize=14
Expected behavior
Validation should work after:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: