From e705b03eafd1b09ba15a23e2b7315e3afa6308e8 Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Wed, 24 Jul 2024 05:52:23 -0500 Subject: [PATCH] Fix validation for `Action.Type` field The now removed error handling was used prior to refactoring applied in commit 7ef6d5203f760f07ad704fb027f4f7ff2696fcc8. credit: Thanks to @ArcticXWolf for reporting this. - refs GH-268 - refs GH-251 --- adaptivecard/adaptivecard.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/adaptivecard/adaptivecard.go b/adaptivecard/adaptivecard.go index 25706ec..40cbe4a 100644 --- a/adaptivecard/adaptivecard.go +++ b/adaptivecard/adaptivecard.go @@ -1934,12 +1934,6 @@ func (a Action) Validate() error { // Optional, but only supported by the Action.ShowCard type. case a.Card != nil: v.FieldHasSpecificValue(a.Type, "type", TypeActionShowCard, "type", ErrInvalidType) - - return fmt.Errorf( - "error: specifying a Card is unsupported for Action type %q: %w", - a.Type, - ErrInvalidFieldValue, - ) } // Return the last recorded validation error, or nil if no validation