I have a model with a string field, that must be at least two characters long :
def changeset(model, params \\ :empty) do
model
|> cast(params, @required_fields, @optional_fields)
|> validate_length(:name, min: 2)
end
The problem is that changeset.errors, when rightfully filled, returns :
[name: {"should be at least %{count} characters", 2}]
Is it a bug, if not how can I interpolate this tuple ?