Validate_uniqueness_of and accented characters


#1

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?