Skip to content

Commit

Permalink
fmt'd some code
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Jul 18, 2017
1 parent 450b6c9 commit 618c56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validators/email_is_present.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type EmailLike struct {
// IsValid performs the validation based on email struct (username@domain)
func (v *EmailLike) IsValid(errors *validate.Errors) {
parts := strings.Split(v.Field, "@")
if len(parts) != 2 || len(parts[0]) == 0 || len(parts[1]) == 0{
if len(parts) != 2 || len(parts[0]) == 0 || len(parts[1]) == 0 {
if v.Message == "" {
v.Message = fmt.Sprintf("%s does not match the email format.", v.Name)
}
Expand Down

0 comments on commit 618c56c

Please sign in to comment.