Skip to content

Commit

Permalink
Fix email validator bug revel#485
Browse files Browse the repository at this point in the history
Fix email validator
  • Loading branch information
Dmitry Kakunin committed Jan 28, 2014
1 parent 0006089 commit 1bd6038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (m Match) DefaultMessage() string {
return fmt.Sprintln("Must match", m.Regexp)
}

var emailPattern = regexp.MustCompile("[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?")
var emailPattern = regexp.MustCompile("^[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?$")

type Email struct {
Match
Expand Down

0 comments on commit 1bd6038

Please sign in to comment.