Skip to content

Commit

Permalink
Fixing 'invalid' email address regex
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhayward committed Nov 22, 2013
1 parent 401afbc commit 4a030e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/regex.js
@@ -1,6 +1,6 @@
exports.url = /(^(https?):\/\/[^\s\/$.?#].[^\s]*$)|(^\/\S+$)/;
exports.absoluteUrl = /^https?:\/\/[^\s\/$.?#].[^\s]*$/;
exports.email = /[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?/;
exports.email = /[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?/i;
exports.origin = /^(https?):\/\/[^\s\/$.?#].[^\s\/]*\/?$/;
exports.version = /^v?\d+\.\d+(\.\d+)?$/;
exports.date = /(^\d{4}-\d{2}-\d{2}$)|(^\d{1,10}$)/;
Expand Down

0 comments on commit 4a030e7

Please sign in to comment.