Skip to content

Commit

Permalink
return clean email (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexopenline authored Aug 19, 2024
1 parent d56a081 commit 08df53b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mailvalidate/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ type EmailValidation struct {
}

type SyntaxValidation struct {
IsValid bool
User string
Domain string
IsValid bool
User string
Domain string
CleanEmail string
}

func ValidateEmailSyntax(email string) SyntaxValidation {
Expand All @@ -61,9 +62,10 @@ func ValidateEmailSyntax(email string) SyntaxValidation {
return SyntaxValidation{}
}
return SyntaxValidation{
IsValid: true,
User: user,
Domain: domain,
IsValid: true,
User: user,
Domain: domain,
CleanEmail: cleanEmail,
}
}

Expand Down

0 comments on commit 08df53b

Please sign in to comment.