From f719a0bbf5926e6927d6ecba04cf91187f40c0ad Mon Sep 17 00:00:00 2001 From: Alex <$(pass /github/email)> Date: Sun, 2 Mar 2025 23:14:59 +0100 Subject: [PATCH] Birthday not required when supporter --- go-backend/internal/models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"`