O'Reilly logo
  • Tim Butterfield thinks this is interesting:

Why Is the Second Parameter :empty?

From

Cover of Programming Phoenix

Note

In Ecto 2.0, the use of ':empty' has been deprecated. Use of the empty map '%{}' still traps for the missing/required fields. If that is insufficient, you could add '|> validate_required([:name, :username])' below the cast.