Ecto.Changeset.constraints
You're seeing just the function
constraints
, go back to Ecto.Changeset module for more information.
Specs
constraints(t()) :: [constraint()]
Returns all constraints in a changeset.
A constraint is a map with the following fields:
:type
- the type of the constraint that will be checked in the database, such as:check
,:unique
, etc:constraint
- the database constraint name as a string:match
- the type of match Ecto will perform on a violated constraint against the:constraint
value. It is:exact
,:suffix
or:prefix
:field
- the field a violated constraint will apply the error to:error_message
- the error message in case of violated constraints:error_type
- the type of error that identifies the error message