Skip to content

Commit d13ba43

Browse files
earl-warrenGusted
authored andcommitted
Fix required error for token name (go-gitea#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 76e8923 commit d13ba43

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)