Hello Devmates, 👋
Today I learned about the client side validation using
It is used to provide a regular expression (regex) to the input element of HTML. This regex is automatically checked just like a required attribute is checked in HTML.
It works with the input types including text, search, url, tel, email, and password.
Here is a pen demonstrating an email input which only accept secure emails:
Note: Never rely on only client side validation. Server Side validation is important from the security perspective. (I know this is obvious, Don't give me that look 😐)