Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Update email regex

Maidul Islamaa218d2ddc60
diff --git a/cli/packages/cmd/login.go b/cli/packages/cmd/login.go
index d448823582..29e2c49358 100644
--- a/cli/packages/cmd/login.go
+++ b/cli/packages/cmd/login.go
@@ -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")
}