Update email regex

This commit is contained in:
Maidul Islam
2022-12-08 11:23:53 -05:00
parent c36aa3591a
commit aa218d2ddc

View File

@@ -114,7 +114,7 @@ func init() {
func askForLoginCredentials() (email string, password string, err error) {
validateEmail := func(input string) error {
matched, err := regexp.MatchString("^\\S+@\\S+$", input)
matched, err := regexp.MatchString("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$", input)
if err != nil || !matched {
return errors.New("this doesn't look like an email address")
}