Forum: Ruby on Rails validate_uniqueness_of and accented characters.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6fce1175151b0668f66e36bcfe5c3994?d=identicon&s=25 rubenrails (Guest)
on 2009-04-28 09:03
(Received via mailing list)
Hi,

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.