Loosen email regex

This commit is contained in:
Maidul Islam
2022-12-08 09:01:24 -05:00
parent da6a8ccdea
commit 58b252a9e9
2 changed files with 2 additions and 2 deletions
+1 -1
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("^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", input)
matched, err := regexp.MatchString("^\\S+@\\S+$", input)
if err != nil || !matched {
return errors.New("this doesn't look like an email address")
}