Skip to content
Snippets Groups Projects
Commit 80049c15 authored by jensilo's avatar jensilo
Browse files

fix bug where validation errors are displayed twice, once with correct translation and once raw

parent e7d02aea
No related branches found
No related tags found
No related merge requests found
...@@ -467,7 +467,8 @@ func (d *FormData[T]) AllViolations() []error { ...@@ -467,7 +467,8 @@ func (d *FormData[T]) AllViolations() []error {
var errs []error var errs []error
for _, fieldErrs := range d.Violations { for _, fieldErrs := range d.Violations {
for _, err := range fieldErrs { for _, err := range fieldErrs {
if errors.Is(err, &validation.Error{}) { var v validation.Error
if errors.As(err, &v) {
continue continue
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment