Ecto.Changeset.validate_subset
You're seeing just the function
validate_subset
, go back to Ecto.Changeset module for more information.
Specs
Validates a change, of type enum, is a subset of the given enumerable.
This validates if a list of values belongs to the given enumerable.
If you need to validate if a single value is inside the given enumerable,
you should use validate_inclusion/4
instead.
Options
:message
- the message on failure, defaults to "has an invalid entry"
Examples
validate_subset(changeset, :pets, ["cat", "dog", "parrot"])
validate_subset(changeset, :lottery_numbers, 0..99)