Valpa (Valpa v0.1.0)

View Source

Valpa is a composable validation library for Elixir.

It supports validation of raw values, {:ok, _} and {:error, _} tuples with pipelined field validations and automatic error propagation.

Features include:

  • Simple, reusable validation functions for values and maps/structs
  • Optional and required variants for all validators
  • Extensible with custom validators
  • Detailed error reporting with rich metadata

For usage examples and full documentation, see:

Summary

Functions

Functions

boolean(input)

boolean(input, key)

decimal(input)

decimal(input, key)

float(input)

float(input, key)

integer(input)

integer(input, key)

integer_in_range(input, crit)

integer_in_range(input, key, crit)

list(input)

list(input, key)

list_of_length(input, crit)

list_of_length(input, key, crit)

list_of_type(input, crit)

list_of_type(input, key, crit)

list_of_values(input, crit)

list_of_values(input, key, crit)

map(input)

map(input, key)

map_compare_decimal_keys(input, crit)

map_compare_decimal_keys(input, key, crit)

map_compare_float_keys(input, crit)

map_compare_float_keys(input, key, crit)

map_compare_int_keys(input, crit)

map_compare_int_keys(input, key, crit)

map_exclusive_keys(input, crit)

map_exclusive_keys(input, key, crit)

map_exclusive_optional_keys(input, crit)

map_exclusive_optional_keys(input, key, crit)

map_inclusive_keys(input, crit)

map_inclusive_keys(input, key, crit)

maybe_boolean(input)

maybe_boolean(input, key)

maybe_decimal(input)

maybe_decimal(input, key)

maybe_float(input)

maybe_float(input, key)

maybe_integer(input)

maybe_integer(input, key)

maybe_integer_in_range(input, crit)

maybe_integer_in_range(input, key, crit)

maybe_list(input)

maybe_list(input, key)

maybe_list_of_length(input, crit)

maybe_list_of_length(input, key, crit)

maybe_list_of_type(input, crit)

maybe_list_of_type(input, key, crit)

maybe_list_of_values(input, crit)

maybe_list_of_values(input, key, crit)

maybe_map(input)

maybe_map(input, key)

maybe_map_compare_decimal_keys(input, crit)

maybe_map_compare_decimal_keys(input, key, crit)

maybe_map_compare_float_keys(input, crit)

maybe_map_compare_float_keys(input, key, crit)

maybe_map_compare_int_keys(input, crit)

maybe_map_compare_int_keys(input, key, crit)

maybe_map_exclusive_keys(input, crit)

maybe_map_exclusive_keys(input, key, crit)

maybe_map_exclusive_optional_keys(input, crit)

maybe_map_exclusive_optional_keys(input, key, crit)

maybe_map_inclusive_keys(input, crit)

maybe_map_inclusive_keys(input, key, crit)

maybe_nonempty_map(input)

maybe_nonempty_map(input, key)

maybe_string(input)

maybe_string(input, key)

maybe_uniq_list(input)

maybe_uniq_list(input, key)

maybe_uniq_list_of_length(input, crit)

maybe_uniq_list_of_length(input, key, crit)

maybe_uniq_list_of_type(input, crit)

maybe_uniq_list_of_type(input, key, crit)

maybe_uniq_list_of_values(input, crit)

maybe_uniq_list_of_values(input, key, crit)

maybe_value_of_values(input, crit)

maybe_value_of_values(input, key, crit)

maybe_value_or_list_of_values(input, crit)

maybe_value_or_list_of_values(input, key, crit)

maybe_value_or_uniq_list_of_values(input, crit)

maybe_value_or_uniq_list_of_values(input, key, crit)

nonempty_map(input)

nonempty_map(input, key)

string(input)

string(input, key)

uniq_list(input)

uniq_list(input, key)

uniq_list_of_length(input, crit)

uniq_list_of_length(input, key, crit)

uniq_list_of_type(input, crit)

uniq_list_of_type(input, key, crit)

uniq_list_of_values(input, crit)

uniq_list_of_values(input, key, crit)

value_of_values(input, crit)

value_of_values(input, key, crit)

value_or_list_of_values(input, crit)

value_or_list_of_values(input, key, crit)

value_or_uniq_list_of_values(input, crit)

value_or_uniq_list_of_values(input, key, crit)