While it's true that the <input type="email"> HTML element does provide basic email address validation, it may not be sufficient for all use cases. Using regular expressions (regex) to validate email addresses allows for more precise and customizable validation, as you can specify exactly what constitutes a valid email address according to your specific requirements.
Additionally, the <input type="email"> element only works on modern browsers, whereas regex can be used to validate email addresses on any platform.
That being said, using both the <input type="email"> element and regex can provide an extra layer of validation to ensure that the email addresses entered by users are in the correct format.
French web developer mainly but touches everything. Volunteer admin mod here at DEV. I learn Nuxt at this moment and databases. — Addict to Cappuccino and Music
<input type="email"> is good for modern navigators, but not for all. This is important to check in backend and/or on front to check if it is an email with a ReGex. 👍🏼☕
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.
While it's true that the
<input type="email">HTML element does provide basic email address validation, it may not be sufficient for all use cases. Using regular expressions (regex) to validate email addresses allows for more precise and customizable validation, as you can specify exactly what constitutes a valid email address according to your specific requirements.Additionally, the
<input type="email">element only works on modern browsers, whereas regex can be used to validate email addresses on any platform.That being said, using both the
<input type="email">element and regex can provide an extra layer of validation to ensure that the email addresses entered by users are in the correct format.Good response!
<input type="email">is good for modern navigators, but not for all. This is important to check in backend and/or on front to check if it is an email with a ReGex. 👍🏼☕