您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package forms
  4. import (
  5. "net/http"
  6. "code.gitea.io/gitea/modules/context"
  7. "code.gitea.io/gitea/modules/web/middleware"
  8. "gitea.com/go-chi/binding"
  9. )
  10. // EditRunnerForm form for admin to create runner
  11. type EditRunnerForm struct {
  12. Description string
  13. CustomLabels string // comma-separated
  14. }
  15. // Validate validates form fields
  16. func (f *EditRunnerForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
  17. ctx := context.GetValidateContext(req)
  18. return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
  19. }