diff --git a/go-backend/internal/models/user.go b/go-backend/internal/models/user.go index 426692c..483e4a7 100644 --- a/go-backend/internal/models/user.go +++ b/go-backend/internal/models/user.go @@ -14,7 +14,7 @@ type User struct { CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `gorm:"index"` - DateOfBirth time.Time `gorm:"not null" json:"dateofbirth" binding:"required,safe_content"` + DateOfBirth time.Time `gorm:"not null" json:"dateofbirth" binding:"required_unless=RoleID 0,safe_content"` Company string `json:"company" binding:"omitempty,omitnil,safe_content"` Phone string `json:"phone" binding:"omitempty,omitnil,safe_content"` Notes string `json:"notes" binding:"safe_content"`