diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-06-12 07:43:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-12 13:43:27 +0800 |
commit | edf14202fea349500d69ed2a360a53cc0d1f80e3 (patch) | |
tree | 2702b4bd827d1c7c5a8384115ec28e73128fa88a /modules | |
parent | 3898fc5bdafa33432d8ee9841e09b5c8b372df12 (diff) | |
download | gitea-edf14202fea349500d69ed2a360a53cc0d1f80e3.tar.gz gitea-edf14202fea349500d69ed2a360a53cc0d1f80e3.zip |
Unify repo settings & show better error (#19828)
* Unify context data
* Actually show invalid url in error
Diffstat (limited to 'modules')
-rw-r--r-- | modules/web/middleware/binding.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/web/middleware/binding.go b/modules/web/middleware/binding.go index c9dc4a8f59..88a3920f6e 100644 --- a/modules/web/middleware/binding.go +++ b/modules/web/middleware/binding.go @@ -128,7 +128,7 @@ func Validate(errs binding.Errors, data map[string]interface{}, f Form, l transl case binding.ERR_EMAIL: data["ErrorMsg"] = trName + l.Tr("form.email_error") case binding.ERR_URL: - data["ErrorMsg"] = trName + l.Tr("form.url_error") + data["ErrorMsg"] = trName + l.Tr("form.url_error", errs[0].Message) case binding.ERR_INCLUDE: data["ErrorMsg"] = trName + l.Tr("form.include_error", GetInclude(field)) case validation.ErrGlobPattern: |