Xema.ValidationError.format_error

You're seeing just the function format_error, go back to Xema.ValidationError module for more information.

Specs

format_error({:error, map()} | map()) :: String.t()

This function returns an error message for an error or error tuple.

Example

iex> schema = Xema.new(:integer)
iex> schema
...>   |> Xema.Validator.validate(1.1)
...>   |> Xema.ValidationError.format_error()
"Expected :integer, got 1.1."