Man do what suits you best, Personally for me, I like to minimise package dependencies, thus would use the native HTML approach until it takes a lot of work to roll with it, then I would look for other alternatives as needed :)
Sounds legit. Not depending on a lib is always good. Can you do also dependant validation? Lets say if a=dog, b can only be "good Boy | bad Boy" ? Otherwise it has no validation.. smth like that? Is that possible with native HTML validators? I'm not experienced with that sorry if that sounds kinda stupid
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.
Man do what suits you best, Personally for me, I like to minimise package dependencies, thus would use the native HTML approach until it takes a lot of work to roll with it, then I would look for other alternatives as needed :)
Sounds legit. Not depending on a lib is always good. Can you do also dependant validation? Lets say if a=dog, b can only be "good Boy | bad Boy" ? Otherwise it has no validation.. smth like that? Is that possible with native HTML validators? I'm not experienced with that sorry if that sounds kinda stupid
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 :)