You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runner.go 606B

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.GetContext(req)
  18. return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
  19. }