'react-hook-form server-side validation confronts with client-side

I have an input with server-side validation placed on onChange event, but it collides with client-side validation I have on onBlur event. So as I understand it works like this - user inputs a server-invalid value, handler does setError and the error is displayed, then user unfocuses the input, onBlur handler does another validation which the value passes and clears the first error.

Kinda similar problem without onBlur validation at all when I submit form, it also clears server errors since the values pass client validation. Is it possible for these two to co-exist?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source