Joi.Util (Joi v0.2.1) View Source
Link to this section Summary
Functions
Returns all types that Joi supported
Append a parent_path to the options of schema's field
Return a module name when input a atom
Return a new parent path.
Return the real path of error
Returns a list of types that support the input validator
Link to this section Functions
Returns all types that Joi supported
Append a parent_path to the options of schema's field
Return a module name when input a atom
Examples:
iex> atom_type_to_mod(:atom)
Joi.Type.Atom
See Joi.Error.new/2
.
Return a new parent path.
The parent path default is nil, the return a [parent_index] list by input field.
Return the real path of error
Examples:
iex> path("2", parent_path: [1])
[1, "2"]
iex> path("2", [])
["2"]
Returns a list of types that support the input validator
Examples:
iex> types_of(:min_length)
[:string, atom, :list]