Fix max length check and limit in multiple repo forms (#9148)
* Fix input field max length for release, label and milestone forms * Add max length for isseu and PR title
This commit is contained in:
parent
e8241bf55e
commit
95c3dc856a
6 changed files with 15 additions and 15 deletions
|
@ -507,9 +507,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
|
||||
|
@ -523,7 +523,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"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue