fix: update error messages to reflect full config keys
This commit is contained in:
parent
fc6240c149
commit
c9531bc588
|
@ -19,16 +19,16 @@ type MailConfig struct {
|
||||||
|
|
||||||
func (m MailConfig) Validate() error {
|
func (m MailConfig) Validate() error {
|
||||||
if m.Host == "" {
|
if m.Host == "" {
|
||||||
return errors.New("host is required")
|
return errors.New("core.mail.host is required")
|
||||||
}
|
}
|
||||||
if m.Username == "" {
|
if m.Username == "" {
|
||||||
return errors.New("username is required")
|
return errors.New("core.mail.username is required")
|
||||||
}
|
}
|
||||||
if m.Password == "" {
|
if m.Password == "" {
|
||||||
return errors.New("password is required")
|
return errors.New("core.mail.password is required")
|
||||||
}
|
}
|
||||||
if m.From == "" {
|
if m.From == "" {
|
||||||
return errors.New("from is required")
|
return errors.New("core.mail.from is required")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue