Request.Validator.Helper (RequestValidator v0.6.0) View Source

Link to this section Summary

Functions

iex> Request.Validator.Helper.gt(:age)

iex> Request.Validator.Helper.in_list(["male", "female"])

iex> Request.Validator.Helper.lt(:age)

iex> Request.Validator.Helper.max(30)

iex> Request.Validator.Helper.min(30)

iex> Request.Validator.Helper.required(:string) ~w[required string]a iex> Request.Validator.Helper.required([:string, :email, {:max, 100}]) [:required, :string, :email, {:max, 100}] iex> Request.Validator.Helper.required({:max, 100}) [:required, {:max, 100}]

iex> Request.Validator.Helper.size(30)

Link to this section Functions

Specs

gt(atom()) :: {:gt, atom()}

iex> Request.Validator.Helper.gt(:age)

iex> Request.Validator.Helper.gt(:year)

Specs

in_list([any()]) :: {:in_list, [any()]}

iex> Request.Validator.Helper.in_list(["male", "female"])

iex> Request.Validator.Helper.in_list(~w[tech law finance])

iex> Request.Validator.Helper.in_list(~w[doctor nurse nurse midwife specialist midwife doctor])

Specs

lt(atom()) :: {:lt, atom()}

iex> Request.Validator.Helper.lt(:age)

iex> Request.Validator.Helper.lt(:year)

Specs

max(number()) :: {:max, number()}

iex> Request.Validator.Helper.max(30)

iex> Request.Validator.Helper.max(40)

Specs

min(number()) :: {:min, number()}

iex> Request.Validator.Helper.min(30)

iex> Request.Validator.Helper.min(40)

iex> Request.Validator.Helper.required(:string) ~w[required string]a iex> Request.Validator.Helper.required([:string, :email, {:max, 100}]) [:required, :string, :email, {:max, 100}] iex> Request.Validator.Helper.required({:max, 100}) [:required, {:max, 100}]

Specs

size(number()) :: {:size, number()}

iex> Request.Validator.Helper.size(30)

iex> Request.Validator.Helper.size(40)