Forum: Ruby on Rails validate_uniqueness_of and accented characters.

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
rubenrails (Guest)
on 2009-04-28 11:03
(Received via mailing list)

I'm trying to validate the uniqueness of a value that has accented
characters (á, é, í, etc) and need rails to treat them as the original
letters (a, e, i).

For example, if a user tries to register himself using last name
"Perez", but there's already a record with the last name "Pérez", I
need the validate function to treat these two words as the same, thus
avoiding 'duplicated' records on the table. I'm using utf8_unicode_ci
for both table and column in mysql database.

Does anyone has experience validating_uniqueness_of values with
accented characters?
This topic is locked and can not be replied to.