mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-15 21:06:05 +00:00
72a9debaff
Clarify the "validation" and "error display" logic. All the copied&pasted `Validate` functions are removed.
22 lines
597 B
Go
22 lines
597 B
Go
// Copyright 2017 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package forms
|
|
|
|
import "gitea.dev/modules/web/middleware"
|
|
|
|
// NewBranchForm form for creating a new branch
|
|
type NewBranchForm struct {
|
|
middleware.FormDefaultValidator
|
|
NewBranchName string `binding:"Required;MaxSize(100);GitRefName"`
|
|
CurrentPath string
|
|
CreateTag bool
|
|
}
|
|
|
|
// RenameBranchForm form for rename a branch
|
|
type RenameBranchForm struct {
|
|
middleware.FormDefaultValidator
|
|
From string `binding:"Required;MaxSize(100);GitRefName"`
|
|
To string `binding:"Required;MaxSize(100);GitRefName"`
|
|
}
|