refactor: clean up form binding & validation (#38873)

Clarify the "validation" and "error display" logic.

All the copied&pasted `Validate` functions are removed.
This commit is contained in:
wxiaoguang
2026-08-14 02:15:33 +00:00
committed by GitHub
parent 8b40df255b
commit 72a9debaff
30 changed files with 331 additions and 737 deletions
+2
View File
@@ -39,6 +39,7 @@ import (
"gitea.dev/modules/translation"
"gitea.dev/modules/util"
"gitea.dev/modules/web"
"gitea.dev/modules/web/middleware"
"gitea.dev/routers/common"
actions_service "gitea.dev/services/actions"
context_module "gitea.dev/services/context"
@@ -277,6 +278,7 @@ type LogCursor struct {
}
type ViewRequest struct {
middleware.FormDefaultValidator
LogCursors []LogCursor `json:"logCursors"`
}