Kungfuig.Validator behaviour (Kungfuig v0.3.0) View Source

Generic validator encapsulation.

Default implementation is NimbleOptions.

Link to this section Summary

Callbacks

Generates a documentation for expected options

Validates given options with the schema, provided by the implementation of this behaviour

Link to this section Callbacks

Specs

doc(options :: keyword()) :: String.t()

Generates a documentation for expected options

Specs

validate(options :: map() | keyword()) ::
  {:ok, validated_options :: keyword()} | {:error, any()}

Validates given options with the schema, provided by the implementation of this behaviour