<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TabletopGame/Observer/validateAction(_:snapshot:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit0A4GameC8ObserverP14validateAction_8snapshotSbqd___AA13TableSnapshotVtAA0aF0Rd__lF"
  },
  "title" : "validateAction(_:snapshot:)"
}
-->

# validateAction(_:snapshot:)

Called to determine whether an action should be included as part
of the table state based only on the action and the table state
snapshot it is being applied to.
Must be a pure function.
Called for all actions multiple times between becoming pending and
being confirmed (or rolled back) as necessary to determine an
internally consistent speculative visible table state each update,
and, finally, to resolve the internally consistent network shared
table state.
Potentially also called after confirmed if an interaction that added
actions is cancelled to determine a new internally consistent shared
network table state.

```
func validateAction(_ action: some TabletopAction, snapshot: TableSnapshot) -> Bool
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)