From abe38520aaaefdfaea4c47130eea04a42a82627b Mon Sep 17 00:00:00 2001 From: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:35:06 +0200 Subject: [PATCH] fix: user can be created without having to specify an email - #2801 --- src/auth/baseFields/auth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/auth/baseFields/auth.ts b/src/auth/baseFields/auth.ts index 0415dca2c8..c17e9fc0ff 100644 --- a/src/auth/baseFields/auth.ts +++ b/src/auth/baseFields/auth.ts @@ -11,6 +11,7 @@ const baseAuthFields: Field[] = [ type: 'email', validate: email, unique: true, + required: true, admin: { components: { Field: () => null, @@ -36,7 +37,7 @@ const baseAuthFields: Field[] = [ name: 'hash', type: 'text', hidden: true, - } + }, ]; -export default baseAuthFields +export default baseAuthFields;