Public Access
feat(registration): no invite code, request text
This commit is contained in:
1 parent
f4e69e1a94
commit
79b086c525
7 files changed
+55
-42
No files matched your search
@@ -13,10 +13,6 @@ const passwordField = z
|
||||
.min(8, 'VALIDATION.PASSWORD_TOO_SHORT')
|
||||
.refine((value) => new TextEncoder().encode(value).length <= 72, 'VALIDATION.PASSWORD_TOO_LONG');
|
||||
|
||||
const inviteCodeField = z
|
||||
.string()
|
||||
.min(1, 'VALIDATION.INVITE_CODE_REQUIRED');
|
||||
|
||||
// Same rule as the Auth service: 3-24 letters, digits, space, _ . - and no space at the ends.
|
||||
// An empty field means "no display name" and is sent as null.
|
||||
const displayNameField = z
|
||||
@@ -33,7 +29,6 @@ export const registrationSchema = z
|
||||
email: emailField,
|
||||
password: passwordField,
|
||||
passwordConfirmation: z.string().min(1, 'VALIDATION.PASSWORD_CONFIRMATION_REQUIRED'),
|
||||
inviteCode: inviteCodeField,
|
||||
displayName: displayNameField,
|
||||
})
|
||||
.refine((d) => d.password === d.passwordConfirmation, {
|
||||
|
||||
Reference in new issue
Block a user