1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

Fix max length check and limit in multiple repo forms (#9148) (#9204)

* Fix input field max length for release, label and milestone forms

* Add max length for isseu and PR title
This commit is contained in:
6543
2019-11-29 07:00:19 +01:00
committed by Lunny Xiao
parent f36efe0b54
commit 42dae399eb
6 changed files with 15 additions and 15 deletions

View File

@@ -499,9 +499,9 @@ func (f SubmitReviewForm) HasEmptyContent() bool {
// NewReleaseForm form for creating release
type NewReleaseForm struct {
TagName string `binding:"Required;GitRefName"`
Target string `form:"tag_target" binding:"Required"`
Title string `binding:"Required"`
TagName string `binding:"Required;GitRefName;MaxSize(255)"`
Target string `form:"tag_target" binding:"Required;MaxSize(255)"`
Title string `binding:"Required;MaxSize(255)"`
Content string
Draft string
Prerelease bool
@@ -515,7 +515,7 @@ func (f *NewReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
// EditReleaseForm form for changing release
type EditReleaseForm struct {
Title string `form:"title" binding:"Required"`
Title string `form:"title" binding:"Required;MaxSize(255)"`
Content string `form:"content"`
Draft string `form:"draft"`
Prerelease bool `form:"prerelease"`