From 648e2fb7db4466d8f837795fc6dc91e6a10d49f0 Mon Sep 17 00:00:00 2001 From: Julink Date: Wed, 31 Jul 2024 15:56:50 +0200 Subject: [PATCH] fix: record github regex validation --- packages/linea-ens-app/src/validators/validateAccount.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/linea-ens-app/src/validators/validateAccount.ts b/packages/linea-ens-app/src/validators/validateAccount.ts index 8b9391cea..080d955d5 100644 --- a/packages/linea-ens-app/src/validators/validateAccount.ts +++ b/packages/linea-ens-app/src/validators/validateAccount.ts @@ -12,7 +12,7 @@ const twitterRegex = /^[A-Za-z0-9_]{1,15}$/ * - cannot have consecutive hyphens * - cannot end with hyphen for new users, but existing usernames can */ -const githubRegex = /^[a-z\d](?:[a-z\d]-?){0,38}$/i +const githubRegex = /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(-?)?$/i /* discord: * - 2-32 chars