This project is archived and is in readonly mode.

#6373 ✓resolved
Kevin Skoglund

validates_length_of error message pluralization

Reported by Kevin Skoglund | February 4th, 2011 @ 04:05 PM

The default error message for validates_length_of is "is too short (minimum is %{count} characters)". This causes incorrect pluralization for edge cases :minimum => 1 and :in => 1..10.

This is not a simple fix in the validation method because the messages are static text pulled from the i18n YAML files. Instead I have added a paragraph to the guides to raise the issue and suggest that developers use validates_presence_of or send a personalized message instead.

Patch attached.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>