React-hook-form provides an errors object through useForm. Since checking for error is dependent on the name attribute of the input field (something like
React-hook-form