Skip to content

Commit

Permalink
Merge pull request #269 from atc0005/i268-fix-action-showcard-validation
Browse files Browse the repository at this point in the history
Fix validation for `Action.Type` field
  • Loading branch information
atc0005 committed Jul 24, 2024
2 parents 28f7962 + e705b03 commit 3acf799
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions adaptivecard/adaptivecard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3acf799

Please sign in to comment.