validates_length_of :city, :within => 1…30, :message
=> “Your city can’t be blank”
But the error message keeps showing the default message “City
is too short (minimum is 1 characters)”. It works fine if I set
:too_short and :too_long but that’s extra coding (I’m picky with
DRY).
I just looked at the API and your original line looks like it should work. The configuration options state that message is an alias of too_long/too_short.
What happens if you just remove the message like this:
validates_length_of :city, :within => 1…30
In that case the default too_long/too_short messages are supposed to kick in.