diff options
author | Solomon Victorino <git@solomonvictorino.com> | 2024-08-29 00:56:35 +0200 |
---|---|---|
committer | Solomon Victorino <git@solomonvictorino.com> | 2024-08-29 06:25:17 +0200 |
commit | 471567b3baf20ea6adae6ba55f32fc5bf99ca409 (patch) | |
tree | 1956527fc20355a603174d6ae57fa6ed685e2125 /modules/web | |
parent | Update golang packages (diff) | |
download | forgejo-471567b3baf20ea6adae6ba55f32fc5bf99ca409.tar.xz forgejo-471567b3baf20ea6adae6ba55f32fc5bf99ca409.zip |
fix: use ValidateEmail as binding across web forms
Diffstat (limited to 'modules/web')
-rw-r--r-- | modules/web/middleware/binding.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/web/middleware/binding.go b/modules/web/middleware/binding.go index 8fa71a81bd..bc0735b2cd 100644 --- a/modules/web/middleware/binding.go +++ b/modules/web/middleware/binding.go @@ -143,6 +143,8 @@ func Validate(errs binding.Errors, data map[string]any, f any, l translation.Loc } case validation.ErrInvalidGroupTeamMap: data["ErrorMsg"] = trName + l.TrString("form.invalid_group_team_map_error", errs[0].Message) + case validation.ErrEmail: + data["ErrorMsg"] = trName + l.TrString("form.email_error") default: msg := errs[0].Classification if msg != "" && errs[0].Message != "" { |