# Validate\_uniqueness\_of and accented characters

**URL:** <https://www.ruby-forum.com/t/validate-uniqueness-of-and-accented-characters/166652>\
**Category:** Rails\
**Created:** [April 28, 2009, 9:03am UTC](https://www.ruby-forum.com/t/validate-uniqueness-of-and-accented-characters/166652 "2009-04-28T09:03:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubenrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@rubenrails](https://www.ruby-forum.com/u/rubenrails)\
**Post date:** [April 28, 2009, 9:03am UTC](https://www.ruby-forum.com/t/validate-uniqueness-of-and-accented-characters/166652/1 "2009-04-28T09:03:05Z")

</div>

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?
