Skip to content

Commit

Permalink
fixed lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDonelson committed Dec 21, 2019
1 parent 2b43774 commit caeabf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func ValidateEmailAddress(email string) (err error) {
minLengthOk := len(email) >= 4

re := regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
if !minLengthOk || (re.MatchString(email) == false) {
if !minLengthOk || (!re.MatchString(email)) {
err = fmt.Errorf("Email is not in a valid format")
return
}
Expand Down

0 comments on commit caeabf1

Please sign in to comment.