traveler.store.AbstractStore.validate#

AbstractStore.validate(verbose=0, sources=None, missing_fields='raise', coerce='safe')[source]#

Validate the store’s data against the registered table types.

Parameters:
  • verbose (int, optional) – The verbosity level for validation messages. Default is 0.

  • sources (Collection[str], optional) – A collection of sources to validate against. If not provided, the sources are assumed to be this store’s completed_steps.

  • missing_fields (Literal["raise", "warn", "ignore"], optional) – How to handle missing fields during validation. Default is “raise”.

  • coerce (False or "safe", optional) – Safely coerce fields when possible. If coercion is needed, return a new store and leave this store unchanged.

Returns:

This store when no coercion is needed, otherwise a coerced copy.

Return type:

AbstractStore

Raises:

ValidationError – If validation fails and missing_fields is set to “raise”.