Xema.Validator behaviour (hl7 v1.0.1)

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

Summary

Callbacks

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

Functions

Validates data against the given schema.

Types

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

Callbacks

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

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

Functions

Link to this function

has_key?(value, key)

Link to this function

validate(schema, data)

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

Validates data against the given schema.