From 33e3a97d07ebcf15924fafafbaf9a14f70d88cf6 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 27 Jul 2025 14:33:18 +0200 Subject: [PATCH] fix(choice): fix Match when field data is nil --- form/field_choice.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/form/field_choice.go b/form/field_choice.go index e8f735e..6a4014d 100644 --- a/form/field_choice.go +++ b/form/field_choice.go @@ -38,6 +38,10 @@ type Choices struct { } func (c *Choices) Match(f *Field, value string) bool { + if f.Data == nil { + return false + } + if f.IsSlice { v := reflect.ValueOf(f.Data)