Update CMSForm Country Field Validation

- Modified the validation rule for the Country field in the CMSForm struct to ensure it requires exactly 3 characters, enhancing input validation consistency.
- This change improves the robustness of the form handling by enforcing stricter validation criteria.
This commit is contained in:
Nima Nakhostin
2025-11-29 12:50:56 +03:30
parent bb974ad1ce
commit d57bf95c70
+1 -1
View File
@@ -7,7 +7,7 @@ type CMSForm struct {
Key string `json:"key" valid:"required,length(2|100)" example:"SW-001"`
Language string `json:"language" valid:"optional,length(2|100)" example:"en"`
CompanyName string `json:"company_name" valid:"optional,length(2|100)" example:"Opplens"`
Country string `json:"country" valid:"optional,length(3)" example:"SWE"`
Country string `json:"country" valid:"optional,length(3|3)" example:"SWE"`
Type CMSType `json:"type" valid:"optional,in(company|organization)" example:"company"`
Hero heroSectionForm `json:"hero" valid:"optional"`
Chart chartSectionForm `json:"chart" valid:"optional"`