From f63a21e1be43e9f219636534d99ffe47f1281db7 Mon Sep 17 00:00:00 2001 From: robinknaapen Date: Thu, 2 Jun 2022 14:05:57 +0200 Subject: [PATCH] Handle UnmarshalText error --- forms.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/forms.go b/forms.go index 7a555c0..8c0ea07 100644 --- a/forms.go +++ b/forms.go @@ -48,7 +48,11 @@ func decode(form Values, rv reflect.Value, prefix string) error { continue } - tu.UnmarshalText([]byte(v[0])) + err := tu.UnmarshalText([]byte(v[0])) + if err != nil { + return err + } + continue }