本站源代码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

21 rinda
569B

  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package auth
  5. import (
  6. "gitea.com/macaron/binding"
  7. "gitea.com/macaron/macaron"
  8. )
  9. // NewBranchForm form for creating a new branch
  10. type NewBranchForm struct {
  11. NewBranchName string `binding:"Required;MaxSize(100);GitRefName"`
  12. }
  13. // Validate validates the fields
  14. func (f *NewBranchForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
  15. return validate(errs, ctx.Data, f, ctx.Locale)
  16. }
上海开阖软件有限公司 沪ICP备12045867号-1