mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 16:27:46 +00:00
Update email regex
This commit is contained in:
@@ -114,7 +114,7 @@ func init() {
|
|||||||
|
|
||||||
func askForLoginCredentials() (email string, password string, err error) {
|
func askForLoginCredentials() (email string, password string, err error) {
|
||||||
validateEmail := func(input string) 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 {
|
if err != nil || !matched {
|
||||||
return errors.New("this doesn't look like an email address")
|
return errors.New("this doesn't look like an email address")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user