Helper.Ecto.Validation (helper v1.0.0) View Source

Validation module. Performs changeset field validations

Link to this section Summary

Functions

Validate the field through a mfa call

Validate the length of data

Validate if the field value is not in one of the defined values

Validate the number field

Validate if the field value is in one of the defined values

Validate if the field is not empty

Validate if the field value is one or more of the defined values

Link to this section Functions

Specs

custom(Ecto.Changeset.t(), atom(), {atom() | tuple(), atom(), list()}) ::
  Ecto.Changeset.t()

Validate the field through a mfa call

Link to this function

format(cs, field, options)

View Source

Specs

Link to this function

length(cs, field, options)

View Source

Specs

Validate the length of data

Link to this function

none_of(cs, field, options)

View Source

Specs

Validate if the field value is not in one of the defined values

Link to this function

number(cs, field, options)

View Source

Specs

Validate the number field

Link to this function

one_of(cs, field, options)

View Source

Specs

Validate if the field value is in one of the defined values

Link to this function

required(cs, field, options)

View Source

Specs

required(Ecto.Changeset.t(), atom(), list() | boolean()) :: Ecto.Changeset.t()

Validate if the field is not empty

Link to this function

subset_of(cs, field, options)

View Source

Specs

subset_of(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()

Validate if the field value is one or more of the defined values