Skip to content

Commit

Permalink
Fix validation for Action.Type field
Browse files Browse the repository at this point in the history
The now removed error handling was used prior to refactoring
applied in commit 7ef6d52.

credit: Thanks to @ArcticXWolf for reporting this.

- refs GH-268
- refs GH-251
  • Loading branch information
atc0005 committed Jul 24, 2024
1 parent 28f7962 commit e705b03
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 e705b03

Please sign in to comment.