xema v0.9.3 Xema.Validator behaviour 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
Link to this type
result()
View Source
result()
View Source
result() :: :ok | {:error, map()}
result() :: :ok | {:error, map()}
Link to this section Functions
Link to this function
validate(schema, data)
View Source
validate(schema, data)
View Source
validate(Xema.Behaviour.t() | Xema.Schema.t(), any()) :: result()
validate(Xema.Behaviour.t() | Xema.Schema.t(), any()) :: result()
Validates data
against the given schema
.
Link to this section Callbacks
Link to this callback
validate(any) View Source
A callback for custom validators. For an example see: Custom validators