File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
2222const emailUserPart = / ^ [ a - z \d ! # \$ % & ' \* \+ \- \/ = \? \^ _ ` { \| } ~ ] + $ / i;
2323const gmailUserPart = / ^ [ a - z \d ] + $ / ;
2424const quotedEmailUser = / ^ ( [ \s \x01 - \x08 \x0b \x0c \x0e - \x1f \x7f \x21 \x23 - \x5b \x5d - \x7e ] | ( \\ [ \x01 - \x09 \x0b \x0c \x0d - \x7f ] ) ) * $ / i;
25- const emailUserUtf8Part = / ^ [ a - z \d ! # \$ % & ' \* \+ \- \/ = \? \^ _ ` { \| } ~ \u00A0 - \uD7FF \uF900 - \uFDCF \uFDF0 - \uFFEF ] + $ / i;
25+ const emailUserUtf8Part = / ^ [ a - z \d ! # \$ % & ' \* \+ \- \/ = \? \^ _ ` { \| } ~ \u00A1 - \uD7FF \uF900 - \uFDCF \uFDF0 - \uFFEF ] + $ / i;
2626const quotedEmailUserUtf8 = / ^ ( [ \s \x01 - \x08 \x0b \x0c \x0e - \x1f \x7f \x21 \x23 - \x5b \x5d - \x7e \u00A0 - \uD7FF \uF900 - \uFDCF \uFDF0 - \uFFEF ] | ( \\ [ \x01 - \x09 \x0b \x0c \x0d - \x7f \u00A0 - \uD7FF \uF900 - \uFDCF \uFDF0 - \uFFEF ] ) ) * $ / i;
2727const defaultMaxEmailLength = 254 ;
2828/* eslint-enable max-len */
Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ describe('Validators', () => {
6666 '"wrong()[]",:;<>@@gmail.com' ,
6767 'username@domain.com�' ,
6868 'username@domain.com©' ,
69+ 'nbsp test@test.com' ,
70+ 'nbsp_test@te st.com' ,
71+ 'nbsp_test@test.co m' ,
6972 ] ,
7073 } ) ;
7174 } ) ;
@@ -117,6 +120,7 @@ describe('Validators', () => {
117120 'hans.m端ller@test.com' ,
118121 'z@co.c' ,
119122 'tüst@invalid.com' ,
123+ 'nbsp test@test.com' ,
120124 ] ,
121125 } ) ;
122126 } ) ;
You can’t perform that action at this time.
0 commit comments