You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2025/10/28 01:52:00 UTC

(answer) branch dev updated: fix(internal):add gte,lte bounds for min_content and min_tags

This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/dev by this push:
     new 9bb91818 fix(internal):add gte,lte bounds for min_content and min_tags
9bb91818 is described below

commit 9bb9181815a11e42d114a2c6deeb9a7b07bf43ee
Author: Dinesht04 <di...@gmail.com>
AuthorDate: Fri Oct 24 03:42:51 2025 +0530

    fix(internal):add gte,lte bounds for min_content and min_tags
---
 internal/schema/siteinfo_schema.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/internal/schema/siteinfo_schema.go b/internal/schema/siteinfo_schema.go
index 15acb6d6..76f66cb0 100644
--- a/internal/schema/siteinfo_schema.go
+++ b/internal/schema/siteinfo_schema.go
@@ -75,9 +75,9 @@ type SiteBrandingReq struct {
 
 // SiteWriteReq site write request
 type SiteWriteReq struct {
-	MinimumContent                 int             `validate:"omitempty,min=0" json:"min_content"`
+	MinimumContent                 int             `validate:"omitempty,gte=0,lte=65535" json:"min_content"`
 	RestrictAnswer                 bool            `validate:"omitempty" json:"restrict_answer"`
-	MinimumTags                    int             `validate:"omitempty" json:"min_tags"`
+	MinimumTags                    int             `validate:"omitempty,gte=0,lte=5" json:"min_tags"`
 	RequiredTag                    bool            `validate:"omitempty" json:"required_tag"`
 	RecommendTags                  []*SiteWriteTag `validate:"omitempty,dive" json:"recommend_tags"`
 	ReservedTags                   []*SiteWriteTag `validate:"omitempty,dive" json:"reserved_tags"`