25 lines
581 B
Go
25 lines
581 B
Go
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package forms
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.gitea.io/gitea/modules/web/middleware"
|
|
"code.gitea.io/gitea/services/context"
|
|
|
|
"code.forgejo.org/go-chi/binding"
|
|
)
|
|
|
|
// EditRunnerForm form for admin to create runner
|
|
type EditRunnerForm struct {
|
|
Description string
|
|
}
|
|
|
|
// Validate validates form fields
|
|
func (f *EditRunnerForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
|
|
ctx := context.GetValidateContext(req)
|
|
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
|
}
|