I know it is possibly to use the default browser validation for forms, when making custom form submit
:
event.target.checkValidity();
That does the trick.
However now, I want to validate an email that is not in the form yet, and check whether it is an email or not. I prefer not to use regex, but use the in-built browser validation, just like it does with event.target.checkValidity()
.
Any clue how I can call the function that checkValidity()
uses underlying to check whether an email is correct or not?