Xema.Validator behaviour (xema v0.13.6) View Source

This module contains all validators to check data against a schema.

Link to this section Summary

Functions

Validates data against the given schema.

Callbacks

A callback for custom validators. For an example see: Custom validators

Link to this section Types

Specs

result() :: :ok | {:error, map()}

Link to this section Functions

Specs

validate(Xema.Behaviour.t() | Xema.Schema.t(), any()) :: result()

Validates data against the given schema.

Link to this section Callbacks

Specs

validate(any()) :: :ok | result()

A callback for custom validators. For an example see: Custom validators