mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-30 01:30:46 +00: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:
@@ -14,6 +14,10 @@ type MockLocale struct {
|
||||
Lang, LangName string // these fields are used directly in templates: ctx.Locale.Lang
|
||||
}
|
||||
|
||||
func (l MockLocale) HasKey(trKey string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
var _ Locale = (*MockLocale)(nil)
|
||||
|
||||
func (l MockLocale) Language() string {
|
||||
|
||||
Reference in New Issue
Block a user