check for email fqdn
parent
add10cb754
commit
cec7ee4a82
|
@ -93,7 +93,11 @@ func promptEmail(defaultEmail string) (email string, err error) {
|
|||
email := val.(string)
|
||||
_, err := mail.ParseAddress(email)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not understand that email: %w", err)
|
||||
return fmt.Errorf("'%s' doesn't look like an email: %w", email, err)
|
||||
}
|
||||
|
||||
if !strings.Contains(email, ".") {
|
||||
return fmt.Errorf("'%s' doesn't look like an email: domain not fully qualified", email)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue