summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEarl Warren <109468362+earl-warren@users.noreply.github.com>2023-11-29 04:47:05 +0100
committerGitHub <noreply@github.com>2023-11-29 03:47:05 +0000
commit64cd6e8df5948c5c6b207e42e2e034e8d9bbc11d (patch)
treebcdfeb0716b1db62a4944a70065c53fbb73b3805 /services
parent8b45a4d3668b433eaca68c1f06f40181a9fb1e9b (diff)
downloadgitea-64cd6e8df5948c5c6b207e42e2e034e8d9bbc11d.tar.gz
gitea-64cd6e8df5948c5c6b207e42e2e034e8d9bbc11d.zip
Fix required error for token name (#28267)
- Say to the binding middleware which locale should be used for the required error. - Resolves https://codeberg.org/forgejo/forgejo/issues/1683 (cherry picked from commit 5a2d7966127b5639332038e9925d858ab54fc360) Co-authored-by: Gusted <postmaster@gusted.xyz>
Diffstat (limited to 'services')
-rw-r--r--services/forms/user_form.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/forms/user_form.go b/services/forms/user_form.go
index c0eb03f554..cbab274238 100644
--- a/services/forms/user_form.go
+++ b/services/forms/user_form.go
@@ -365,7 +365,7 @@ func (f *EditVariableForm) Validate(req *http.Request, errs binding.Errors) bind
// NewAccessTokenForm form for creating access token
type NewAccessTokenForm struct {
- Name string `binding:"Required;MaxSize(255)"`
+ Name string `binding:"Required;MaxSize(255)" locale:"settings.token_name"`
Scope []string
}