If you want to validate the input of a form, you can use the HTML built-in validation features for it.
No third party library is required.
Open this example on CodeSandbox:
This example shows how to use the built-in HTML5 validation features.
Check app/root.tsx to see the client-side validation in action.