feat: add site_url and contact_email validation

This commit is contained in:
LinkinStar 2022-11-07 18:03:51 +08:00
parent 530532ab1c
commit d5a57589e6
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@ type SiteGeneralReq struct {
Name string `validate:"required,gt=1,lte=128" form:"name" json:"name"`
ShortDescription string `validate:"required,gt=3,lte=255" form:"short_description" json:"short_description"`
Description string `validate:"required,gt=3,lte=2000" form:"description" json:"description"`
SiteUrl string `validate:"required,gt=1,lte=128" form:"site_url" json:"site_url"`
ContactEmail string `validate:"required,gt=1,lte=128" form:"contact_email" json:"contact_email"`
SiteUrl string `validate:"required,gt=1,lte=512,url" form:"site_url" json:"site_url"`
ContactEmail string `validate:"required,gt=1,lte=512,email" form:"contact_email" json:"contact_email"`
}
// SiteInterfaceReq site interface request