View Source Kungfuig.Validator behaviour (Kungfuig v1.0.0)

Generic validator encapsulation.

Default implementation is NimbleOptions.

Summary

Callbacks

Generates a documentation for expected options

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

Callbacks

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

Generates a documentation for expected options

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

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