added hcaptcha

This commit is contained in:
Mazyar
2025-12-05 18:10:05 +03:30
parent b8a10f355e
commit b01c0f9368
9 changed files with 222 additions and 18 deletions
+5 -4
View File
@@ -4,10 +4,11 @@ import "tm/pkg/response"
// CreateContactForm represents the form for creating a new contact message
type CreateContactForm struct {
FullName string `json:"full_name" valid:"required,length(2|100)" example:"John Doe"`
Email string `json:"email" valid:"required,email" example:"john.doe@example.com"`
Phone string `json:"phone" valid:"required,length(10|20)" example:"+1234567890"`
Message string `json:"message" valid:"required,length(10|1000)" example:"I have a question about your services"`
FullName string `json:"full_name" valid:"required,length(2|100)" example:"John Doe"`
Email string `json:"email" valid:"required,email" example:"john.doe@example.com"`
Phone string `json:"phone" valid:"required,length(10|20)" example:"+1234567890"`
Message string `json:"message" valid:"required,length(10|1000)" example:"I have a question about your services"`
HCaptchaToken string `json:"hcaptcha_token" valid:"required" example:"P0_eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."`
}
// UpdateContactStatusForm represents the form for updating contact status (admin only)