Skip to content

Commit

Permalink
Updating regular expression to match an email that contains a '-' cha…
Browse files Browse the repository at this point in the history
…racter
  • Loading branch information
rickycheers committed Feb 1, 2012
1 parent 67282c1 commit d3698a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formvalidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ var FormValidator = (function(jQuery){
}

function validateEmail(input, value, rule_value) {
return value.match(/([\w-\.]+)@((?:[\w]+\.)+)([a-zA-Z]{2,4})/) ? true : false;
return value.match(/([\w-\.]+)@((?:([\w]|[\-])+\.)+)([a-zA-Z]{2,4})/) ? true : false;
}

function getErrorMessage(key, rule_val) {
Expand Down

0 comments on commit d3698a9

Please sign in to comment.