File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var DATETIME_TYPE_RE = /^\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}$/;
1111var ID_RE = / ^ \d + $ / ;
1212
1313// http://www.regular-expressions.info/email.html
14- var EMAIL_RE = / ^ [ a - z 0 - 9 \! \# \$ \% \& \' \* \+ \/ \= \? \^ \_ \` \{ \| \} \~ \- ] + (?: \. [ a - z 0 - 9 \! \# \$ \% \& \' \* \+ \/ \= \? \^ \_ \` \{ \| \} \~ \- ] + ) * @ (?: [ a - z 0 - 9 ] (?: [ a - z 0 - 9 \- ] * [ a - z 0 - 9 ] ) ? \. ) + [ a - z 0 - 9 ] (?: [ a - z 0 - 9 \- ] * [ a - z 0 - 9 ] ) ? $ / ;
14+ var EMAIL_RE = / ^ [ a - z 0 - 9 \! \# \$ \% \& \' \* \+ \/ \= \? \^ \_ \` \{ \| \} \~ \- ] + (?: \. [ a - z 0 - 9 \! \# \$ \% \& \' \* \+ \/ \= \? \^ \_ \` \{ \| \} \~ \- ] + ) * @ (?: [ a - z 0 - 9 ] (?: [ a - z 0 - 9 \- ] * [ a - z 0 - 9 ] ) ? \. ) + [ a - z 0 - 9 ] (?: [ a - z 0 - 9 \- ] * [ a - z 0 - 9 ] ) ? $ / i ;
1515
1616var PASSWORD_RE = / ^ [ \w \` \~ \! \@ \# \$ \% \^ \& \* \( \) \- \_ \= \+ \[ \] \{ \} \| \; \: \' \" \, \< \. \> \/ \? ] + $ / ;
1717
Original file line number Diff line number Diff line change @@ -303,6 +303,7 @@ describe('parameter', function () {
303303 'dead-horse@qq.com' ,
304304 'fengmk2+github@gmail.com' ,
305305 'fengmk2@yahoo.com.cn' ,
306+ 'Fengmk2@126.Com' ,
306307 ] . forEach ( function ( email ) {
307308 should . not . exist ( parameter . validate ( { name : 'email' } , { name : email } ) ) ;
308309 should . not . exist ( parameter . validate ( { name : { type : 'email' } } , { name : email } ) ) ;
You can’t perform that action at this time.
0 commit comments