Skip to content

Commit

Permalink
Update email regex
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Dec 8, 2022
1 parent c36aa35 commit aa218d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/packages/cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit aa218d2

Please sign in to comment.