Ve.Validator (ve v0.2.0) View Source

Link to this section Summary

Link to this section Types

Specs

opts() :: opts_number() | opts_string() | opts_map() | opts_list()

Specs

opts_fields() :: :optional | :nullable | Ve.schema()

Specs

opts_list() :: {:min, number()} | {:max, number()} | {:of, Ve.schema()}

Specs

opts_map() ::
  {:fields, [{Map.key(), opts_fields()}]} | {:xor, [{Map.key(), Ve.schema()}]}

Specs

opts_number() :: {:min, number()} | {:max, number()}

Specs

opts_string() :: :not_empty | {:pattern, Regex.t()}

Specs

schema() :: [Ve.GenericConstraints.type() | opts()]

Link to this section Functions

Link to this function

validation_messages(data, schema, messages)

View Source

Specs

validation_messages(Ve.Types.data(), Ve.schema(), [Ve.Types.message()]) :: [
  Ve.Types.message()
]