Skip to content

Commit

Permalink
fix(notification/backend/email): Cover all arguments in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Jan 28, 2023
1 parent ddffe9c commit 0fa2bed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions notification/backend/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func (b EmailBackend) Validate() error {
if b.From == "" {
return errors.New("EmailBackend backend requires From")
}
if b.Username == "" {
return errors.New("EmailBackend backend requires Username")
}
if b.Password == "" {
return errors.New("EmailBackend backend requires Password")
}
return nil
}

Expand Down

0 comments on commit 0fa2bed

Please sign in to comment.