JSV.Validator.ValidationContext (jsv v0.27.0)

Copy Markdown View Source

Validation context carried along by the JSV.Validator and given to all vocabulary implementations.

This struct is used to store errors found during validation, and to hold contextual information such as the current path in the data or in the schema.

Summary

Functions

Returns a setting of the validation that does not change while validating, such as :opts, the validation options given to JSV.validate/3.

Types

config_key()

@type config_key() ::
  :feature_errors | :feature_unevaluated | :feature_cast | :opts | :validators

t()

@type t() :: %JSV.Validator.ValidationContext{
  cast_stack: term(),
  config: term(),
  data_path: term(),
  errors: term(),
  eval_path: term(),
  evaluated: term(),
  schema_path: term(),
  scope: term(),
  seen_refs: term()
}

Functions

config(vctx, key)

@spec config(t(), config_key()) :: term()

Returns a setting of the validation that does not change while validating, such as :opts, the validation options given to JSV.validate/3.