mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
refactor: clean up form binding & validation (#38873)
Clarify the "validation" and "error display" logic. All the copied&pasted `Validate` functions are removed.
This commit is contained in:
@@ -25,16 +25,7 @@ type contextKey struct{}
|
||||
|
||||
var ContextKey any = &contextKey{}
|
||||
|
||||
// Locale represents an interface to translation
|
||||
type Locale interface {
|
||||
Language() string
|
||||
TrString(string, ...any) string
|
||||
|
||||
Tr(key string, args ...any) template.HTML
|
||||
TrN(cnt any, key1, keyN string, args ...any) template.HTML
|
||||
|
||||
PrettyNumber(v any) string
|
||||
}
|
||||
type Locale = i18n.LocaleTranslation
|
||||
|
||||
// LangType represents a lang type
|
||||
type LangType struct {
|
||||
|
||||
Reference in New Issue
Block a user