Merge pull request 'Update AddressForm fields to optional in company form validation' (#54) from TM-687 into develop
continuous-integration/drone/push Build is passing

Reviewed-on: https://repo.ravanertebat.com/TM/tm_back/pulls/54
Reviewed-by: Hadi Barzegar <barzagarhadi@gmail.com>
This commit is contained in:
m.nazemi
2026-07-14 00:58:06 +03:30
+5 -5
View File
@@ -44,11 +44,11 @@ type (
// AddressForm represents the form for company address // AddressForm represents the form for company address
AddressForm struct { AddressForm struct {
Street string `json:"street" valid:"required,length(5|200)" example:"123 Main St"` Street string `json:"street" valid:"optional,length(5|200)" example:"123 Main St"`
City string `json:"city" valid:"required,length(2|100)" example:"New York"` City string `json:"city" valid:"optional,length(2|100)" example:"New York"`
State string `json:"state" valid:"required,length(2|100)" example:"NY"` State string `json:"state" valid:"optional,length(2|100)" example:"NY"`
PostalCode string `json:"postal_code" valid:"required,length(3|20)" example:"10001"` PostalCode string `json:"postal_code" valid:"optional,length(3|20)" example:"10001"`
Country string `json:"country" valid:"required,length(2|100)" example:"US"` Country string `json:"country" valid:"optional,length(2|100)" example:"US"`
} }
// CompanyTagsForm represents the form for company tags // CompanyTagsForm represents the form for company tags