Omit values from validation rule error expressions

This commit is contained in:
Chris Bandy
2025-07-07 17:37:39 -05:00
parent 56e2f15c1a
commit 7a43f8bd27

View File

@@ -494,7 +494,9 @@ func (s *Validator) validateExpressions(ctx context.Context, fldPath *field.Path
}
value := obj
if sts.Type == "object" || sts.Type == "array" {
if ok {
value = field.OmitValueType{}
} else if sts.Type == "object" || sts.Type == "array" {
value = sts.Type
}