xema v0.1.1 Xema.String View Source
This module contains the struct for the keywords of type string
.
Usually this struct will be just used by xema
.
Examples
iex> import Xema Xema iex> schema = xema :string %Xema{type: %Xema.String{}} iex> schema.type == %Xema.String{} true
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %Xema.String{as: atom(), enum: list() | nil, max_length: pos_integer() | nil, min_length: pos_integer() | nil, pattern: Regex.t() | nil}
The struct contains the keywords for the type string
.
as
is used in an error report. Default ofas
is:string
enum
specifies an enumerationmax_length
the maximum length of stringmin_length
the minimal length of string