As the docs say (emphasis mine):
It invokes the
validatorfunction to perform the validation only if a change for the givenfieldexists and the change value is notnil.
https://hexdocs.pm/ecto/Ecto.Changeset.html#validate_change/3
That’s because most validations do not want to run on nil. You have one of the few exceptions. ![]()






















