Input component isRequired with react-hook-form #4363
-
https://codesandbox.io/p/devbox/75q2v4 Hi everyone, In above example the form onSubmit is not triggered if I do not fill name field, due to my Input component having isRequired prop. Therefore react-hook-form handleSubmit is not triggered. That leads to my error messages not showing up and isInvalid not updating. The reason I would like to have isRequired in the first place is purely for the asterix to showup next to the label in my form. How can I have asterix without preventing onSubmit trigger. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue is resolved when I wraped my form with nextUI Form instead of html form element. If you do not specify a value for validationBehavior property it skips html validation. |
Beta Was this translation helpful? Give feedback.
The issue is resolved when I wraped my form with nextUI Form instead of html form element. If you do not specify a value for validationBehavior property it skips html validation.