Dont be sorry for asking stupid questions, NEVER. Coming to HTML-native way of validating, HTML can check for empty fields but complex validation? no, you have to implement that yourself in the onSubmit handler.
onSubmit
See this code : codesandbox.io/s/trusting-torvalds... Try submitting the form without entering any value ;)
Thanks. Yeah I was aware of "simple" validation. Ok if I need something more complex I will continue using react-hook-form :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Dont be sorry for asking stupid questions, NEVER.
Coming to HTML-native way of validating, HTML can check for empty fields but complex validation? no, you have to implement that yourself in the
onSubmit
handler.See this code : codesandbox.io/s/trusting-torvalds...
Try submitting the form without entering any value ;)
Thanks. Yeah I was aware of "simple" validation. Ok if I need something more complex I will continue using react-hook-form :)