I want to validate name and surname for my Ruby on Rails 3 application and so I have posted this question. Someone adviced me to read the Falsehoods Progra
The simple answer is, you cannot validate names and surnames other than to verify they are not null*. By filling in a form that asks for a name, somebody is declaring "this is my name", and if someone says "this is my name", you should believe them because they are the ultimate authority of what is their name.
* even then, it's perfectly valid for people to have a single name rather than two or three, and there has been one instance of an individual who didn't actually have a name. He gave himself a symbol instead.