Skip to content

Commit 64cd6e8

Browse files
earl-warrenGusted
andauthored
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 <[email protected]>
1 parent 8b45a4d commit 64cd6e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/forms/user_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func (f *EditVariableForm) Validate(req *http.Request, errs binding.Errors) bind
365365

366366
// NewAccessTokenForm form for creating access token
367367
type NewAccessTokenForm struct {
368-
Name string `binding:"Required;MaxSize(255)"`
368+
Name string `binding:"Required;MaxSize(255)" locale:"settings.token_name"`
369369
Scope []string
370370
}
371371

0 commit comments

Comments
 (0)