1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Add tag check to release draft creation (#3729)

This commit is contained in:
Bwko 2018-06-04 07:34:44 +02:00 committed by Lauris BH
parent fb1daad13d
commit 1f877f8c87
2 changed files with 2 additions and 2 deletions

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

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-_\\./]")
)