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

Types

t()

The struct contains the keywords for the type string

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 of as is :string
  • enum specifies an enumeration
  • max_length the maximum length of string
  • min_length the minimal length of string