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.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user