From 6ba964275ecd74b8f1006e89e2732b4ef339c021 Mon Sep 17 00:00:00 2001 From: Mazyar Date: Mon, 13 Jul 2026 14:17:46 +0330 Subject: [PATCH] Update AddressForm fields to optional in company form validation - Changed validation rules for AddressForm fields from required to optional, allowing for more flexible input during company address submissions. - This adjustment enhances the usability of the form by accommodating scenarios where address details may not be provided. --- internal/company/form.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/company/form.go b/internal/company/form.go index 1d1c33e..89f7989 100644 --- a/internal/company/form.go +++ b/internal/company/form.go @@ -44,11 +44,11 @@ type ( // AddressForm represents the form for company address AddressForm struct { - Street string `json:"street" valid:"required,length(5|200)" example:"123 Main St"` - City string `json:"city" valid:"required,length(2|100)" example:"New York"` - State string `json:"state" valid:"required,length(2|100)" example:"NY"` - PostalCode string `json:"postal_code" valid:"required,length(3|20)" example:"10001"` - Country string `json:"country" valid:"required,length(2|100)" example:"US"` + Street string `json:"street" valid:"optional,length(5|200)" example:"123 Main St"` + City string `json:"city" valid:"optional,length(2|100)" example:"New York"` + State string `json:"state" valid:"optional,length(2|100)" example:"NY"` + PostalCode string `json:"postal_code" valid:"optional,length(3|20)" example:"10001"` + Country string `json:"country" valid:"optional,length(2|100)" example:"US"` } // CompanyTagsForm represents the form for company tags