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 573B

123456789101112131415161718192021222324
  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. }
  14. // Validate validates form fields
  15. func (f *EditRunnerForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
  16. ctx := context.GetValidateContext(req)
  17. return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
  18. }