This project is archived and is in readonly mode.

#1511 ✓wontfix
awendt

Option :case_sensitive for validates_exclusion_of

Reported by awendt | December 3rd, 2008 @ 08:29 AM | in 2.x

Wherever you look, the example for uses of validates_exclusion_of is to reserve usernames. I recently found out that validates_exclusion_of is case sensitive: Why, however, would I want to exclude "admin" if users can still sign up as "Admin"?

I've developed on a patch that introduces a :case_sensitive option to validates_exclusion_of -- so that I am not forced to using validates_each just because I want to prevent users to sign up as "admin" in upper or lower case.

I will also push the patch to github.com/awendt/rails

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages