mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
🐛 fix(auth): require name field in registration forms
Add required name field (min 2 chars) to all registration forms to fix Better Auth validation error. Updates backend DTO, shared-auth service, shared-auth-ui RegisterPage component, i18n translations, and all app auth stores and register pages.
This commit is contained in:
parent
11324b5e68
commit
d3e11b320a
28 changed files with 151 additions and 56 deletions
|
|
@ -85,7 +85,7 @@ export class AuthController {
|
|||
return this.betterAuthService.registerB2C({
|
||||
email: registerDto.email,
|
||||
password: registerDto.password,
|
||||
name: registerDto.name || '',
|
||||
name: registerDto.name,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { IsEmail, IsString, MinLength, MaxLength, IsOptional } from 'class-validator';
|
||||
import { IsEmail, IsString, MinLength, MaxLength } from 'class-validator';
|
||||
|
||||
export class RegisterDto {
|
||||
@IsEmail()
|
||||
|
|
@ -10,7 +10,7 @@ export class RegisterDto {
|
|||
password: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@MinLength(2, { message: 'Name must be at least 2 characters' })
|
||||
@MaxLength(255)
|
||||
name?: string;
|
||||
name: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue