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
Specs
format(Ecto.Changeset.t(), atom(), keyword() | Regex.t()) :: Ecto.Changeset.t() | no_return()
Specs
length(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()
Validate the length of data
Specs
none_of(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()
Validate if the field value is not in one of the defined values
Specs
number(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()
Validate the number field
Specs
one_of(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()
Validate if the field value is in one of the defined values
Specs
required(Ecto.Changeset.t(), atom(), list() | boolean()) :: Ecto.Changeset.t()
Validate if the field is not empty
Specs
subset_of(Ecto.Changeset.t(), atom(), keyword()) :: Ecto.Changeset.t()
Validate if the field value is one or more of the defined values