xema v0.1.1 Xema.List View Source
This module contains the struct for the keywords of type list
.
Usually this struct will be just used by xema
.
Examples
iex> import Xema
Xema
iex> schema = xema :list
%Xema{type: %Xema.List{}}
iex> schema.type == %Xema.List{}
true
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %Xema.List{additional_items: boolean() | nil, as: atom(), items: list() | Xema.t() | nil, max_items: pos_integer() | nil, min_items: pos_integer() | nil, unique_items: boolean() | nil}
The struct contains the keywords for the type list
.
additional_items
disallow additional items, if set to trueas
is used in an error report. Default ofas
is:list
items
specifies the type(s) of the itemsmax_items
the maximum length of listmin_items
the minimal length of listunique_items
disallow duplicate items, if set to true