@celebritydeveloper
Posted
Hello Britney, yes there is. Have you heard of Regular Expressions (RegEx) this is a better way to validate email in Javascript.
@brittjavs
Posted
@celebritydeveloper Thank you! I shall look into this.
Looking to hire developers?
Submitted
@brittjavs
Is there a way to validate properly validate the email in Javascript? Any feedback is welcome.
@celebritydeveloper
Posted
Hello Britney, yes there is. Have you heard of Regular Expressions (RegEx) this is a better way to validate email in Javascript.
@brittjavs
Posted
@celebritydeveloper Thank you! I shall look into this.
@Mahesh-yadav
Posted
Hi
For email validation, you can specify pattern=/RegEx/
attribute on email input element similar to required
attribute. Browser will automatically ensure that entered email matches the given pattern.
For having greater control over error reporting, you can use Constraints Validation API.
I have implemented a basic custom validation in same project. You can see it here
@brittjavs
Posted
@Mahesh-yadav This is really helpful. Thank you!
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord