From 4d8f1e3e4bb61df318dcd1024822c877c0da308a Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 31 Jan 2025 11:16:10 +0100 Subject: [PATCH] chore: Remove `DeadlineForm` - Introduced in 1a97030017cd09b75f6c8d484e075f4eced1e001 and removed in ef6813abc9277f29515cb571c4c4ddc373482e58. --- .deadcode-out | 3 --- services/forms/repo_form.go | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/.deadcode-out b/.deadcode-out index 6c59cb031b..6043eb64ba 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -253,9 +253,6 @@ code.gitea.io/gitea/services/context code.gitea.io/gitea/services/convert ToSecret -code.gitea.io/gitea/services/forms - DeadlineForm.Validate - code.gitea.io/gitea/services/pull IsCommitStatusContextSuccess diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go index 1ce9b298ad..8253a8957b 100644 --- a/services/forms/repo_form.go +++ b/services/forms/repo_form.go @@ -740,17 +740,6 @@ type SaveTopicForm struct { Topics []string `binding:"topics;Required;"` } -// DeadlineForm hold the validation rules for deadlines -type DeadlineForm struct { - DateString string `form:"date" binding:"Required;Size(10)"` -} - -// Validate validates the fields -func (f *DeadlineForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { - ctx := context.GetValidateContext(req) - return middleware.Validate(errs, ctx.Data, f, ctx.Locale) -} - type CommitNotesForm struct { Notes string }