Issue
We're using Angular v12 built-in email validator and we want to use the same regex pattern it uses in other places to be aligned with same email validation logic, what is the regex pattern? I couldn't find it in Angular's Github, a reference to the pattern in the source code would be great too!
Solution
use this pattern in .ts file:
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+[.][a-zA-Z]{2,4}$/
Answered By - minabagheri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.