mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-17 02:33:07 +03:00
feat: make family name optional (#476)
This commit is contained in:
@@ -20,7 +20,7 @@ type UserCreateDto struct {
|
|||||||
Username string `json:"username" binding:"required,username,min=2,max=50"`
|
Username string `json:"username" binding:"required,username,min=2,max=50"`
|
||||||
Email string `json:"email" binding:"required,email"`
|
Email string `json:"email" binding:"required,email"`
|
||||||
FirstName string `json:"firstName" binding:"required,min=1,max=50"`
|
FirstName string `json:"firstName" binding:"required,min=1,max=50"`
|
||||||
LastName string `json:"lastName" binding:"required,min=1,max=50"`
|
LastName string `json:"lastName" binding:"max=50"`
|
||||||
IsAdmin bool `json:"isAdmin"`
|
IsAdmin bool `json:"isAdmin"`
|
||||||
Locale *string `json:"locale"`
|
Locale *string `json:"locale"`
|
||||||
Disabled bool `json:"disabled"`
|
Disabled bool `json:"disabled"`
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export type User = {
|
|||||||
username: string;
|
username: string;
|
||||||
email: string;
|
email: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName?: string;
|
||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
userGroups: UserGroup[];
|
userGroups: UserGroup[];
|
||||||
customClaims: CustomClaim[];
|
customClaims: CustomClaim[];
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
const formSchema = z.object({
|
const formSchema = z.object({
|
||||||
firstName: z.string().min(1).max(50),
|
firstName: z.string().min(1).max(50),
|
||||||
lastName: z.string().min(1).max(50),
|
lastName: z.string().max(50),
|
||||||
username: z
|
username: z
|
||||||
.string()
|
.string()
|
||||||
.min(2)
|
.min(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user