From bdf1262a7125fc2ef167abe3775d60f3db064a22 Mon Sep 17 00:00:00 2001 From: Philip Linde Date: Sun, 27 Nov 2022 13:34:22 +0100 Subject: [PATCH] Don't restrict TLD length in email regex --- cloud/constructors/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/constructors/user.js b/cloud/constructors/user.js index a3676cc..da547fc 100644 --- a/cloud/constructors/user.js +++ b/cloud/constructors/user.js @@ -69,7 +69,7 @@ class User extends Parse.User { if (this.has('validUser')) return; const usernameRegex = /^[0-9a-zA-Z\-_.]{3,15}$/; - const emailRegex = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/; + const emailRegex = /^[\w-.]+@([\w-]+\.)+[\w-]+$/; const username = this.get('username'); const email = this.get('email');