From 186eba99a1da83bdbdb3715e862092df40a9ab86 Mon Sep 17 00:00:00 2001 From: Rohan Singh Date: Thu, 25 Apr 2024 17:17:34 -0400 Subject: [PATCH] schema: Remove `dive` tag on SchemaField.Visibility (#1058) This tag only makes sense on slices and maps. It causes a panic in `go-playground/validator` v10.19.0. --- schema/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/schema.go b/schema/schema.go index 63527edf30..122cd46c2d 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -42,7 +42,7 @@ type SchemaField struct { Visibility *SchemaVisibility `json:"visibility,omitempty" validate:"omitempty,dive"` Default string `json:"default,omitempty" validate:"required_for=dropdown onoff radio"` - Options []SchemaOption `json:"options,omitempty" validate:"required_for=dropdown radio,dive"` + Options []SchemaOption `json:"options,omitempty" validate:"required_for=dropdown radio"` Palette []string `json:"palette,omitempty"` Source string `json:"source,omitempty" validate:"required_for=generated"`