Skip to content

Commit f189236

Browse files
author
Tom Hanoldt
committed
improve email regexp for 2char local parts and subdomain hosts
1 parent b998672 commit f189236

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/input.validator.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class @InputValidator
3333
number: /^\d*$/
3434
tel: /^[0-9/\-\+\s\(\)]*$/
3535
# coffeelint: disable
36-
email: /^\s*([\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+[\w\.!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+)@([\w0-9\-]{2,63}\.[\w]+)\s*$/
36+
email: /^\s*([\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+[\w\.!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]*[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+)@([\w0-9\-\.]{2,63}\.[\w]+)\s*$/
3737
# coffeelint: enable
3838

3939
rules:

0 commit comments

Comments
 (0)