diff options
author | Giteabot <teabot@gitea.io> | 2023-11-29 23:00:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 23:00:32 +0800 |
commit | 24e03a125d3ebeec93a8b39f656cb69529819e1b (patch) | |
tree | b2657c9ea9a039703feb068cea268b689a84eb49 | |
parent | 76e892317b22cad38ce73d41483467699a16a76d (diff) | |
download | gitea-24e03a125d3ebeec93a8b39f656cb69529819e1b.tar.gz gitea-24e03a125d3ebeec93a8b39f656cb69529819e1b.zip |
Fix required error for token name (#28267) (#28284)
Backport #28267 by @earl-warren
- 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: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
-rw-r--r-- | services/forms/user_form.go | 2 |
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 } |