ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

Asterisk in masks prevents the validation

Open jonaskistler opened this issue 4 years ago • 2 comments

I tried to implement an email mask with this pattern: A*@A*.SSS

When you start typing any character in the field, the validation accepts immediately the value, even if you do not write a @ character or a dot.

The validation should fail as long as no @ or no dot is in the text, or the dot is not followed by 3 characters

jonaskistler avatar Oct 08 '20 14:10 jonaskistler

Just so you are aware A*@A*.SSS does not cover all possible emails. It's not even close. Something simple like [email protected] or even the common gmail [email protected].

List of Valid Email Addresses

[email protected] [email protected] [email protected] [email protected] [email protected] email@[123.123.123.123] "email"@example.com [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

List of Strange Valid Email Addresses

much.”more\ unusual”@example.com very.unusual.”@”[email protected] very.”(),:;<>[]”.VERY.”very@\ "very”[email protected]

logic01 avatar Sep 29 '21 20:09 logic01

any updates? @Thegrep01 @NepipenkoIgor

mikaelboff avatar Mar 22 '22 19:03 mikaelboff

@jonaskistler @mikaelboff @logic01 Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-wnctvj?file=src%2Fmain.ts

andriikamaldinov1 avatar Jun 22 '23 12:06 andriikamaldinov1