Skip to content

Commit 1054b03

Browse files
author
Tom Hanoldt
committed
better email regexp
1 parent 3ddfe1c commit 1054b03

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
##### 1.0.21
4+
* better email regexp
5+
36
##### 1.0.20
47
* fix validating checkboxes
58

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\.!#\$%&\'\*\+-\/=\?\^`\{\|\}~]+)@([a-zA-Z0-9\-]{2,63}\..+)\s*$/
36+
email: /^\s*([\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+[\w\.!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+[\w!#\$%&\'\*\+\-\/=\?\^`\{\|\}_~]+)@([\w0-9\-]{2,63}\.[\w]+)\s*$/
3737
# coffeelint: enable
3838

3939
rules:

0 commit comments

Comments
 (0)