Currently, I have implemented react-hook-forms
for handling form functionality and validation in our application. On the other hand, we are utilizing MUI/Material-UI as our component library. One issue that arises is that MUI automatically adds a *
to input labels if they have the required
attribute set. However, when we include the required
attribute on our inputs, HTML5 form validation takes precedence over react-hook-form
's validation using the rules
prop.
Is there a way to combine both of these frameworks so that MUI still adds the *
to required fields, but react-hook-form
's validation rules take precedence over HTML5's validation?