Browse Source

Add tag check to release draft creation (#3729)

for-closed-social
Bwko 6 years ago
committed by Lauris BH
parent
commit
1f877f8c87
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/auth/repo_form.go
  2. +1
    -1
      modules/validation/binding.go

+ 1
- 1
modules/auth/repo_form.go View File

@ -371,7 +371,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
// NewReleaseForm form for creating release
type NewReleaseForm struct {
TagName string `binding:"Required"`
TagName string `binding:"Required;GitRefName"`
Target string `form:"tag_target" binding:"Required"`
Title string `binding:"Required"`
Content string

+ 1
- 1
modules/validation/binding.go View File

@ -19,7 +19,7 @@ const (
)
var (
// GitRefNamePattern is regular expression wirh unallowed characters in git reference name
// GitRefNamePattern is regular expression with unallowed characters in git reference name
GitRefNamePattern = regexp.MustCompile("[^\\d\\w-_\\./]")
)

Loading…
Cancel
Save