We have a form that has fields for the first and last name. I was asked to allow underscores. I don’t know a single SQL injection that uses underscores, but I also don’t know anyone with underscores in their name. Is there a good reason to allow or not allow underscores in names?
EDIT: I am using parameters and server side validation. This is for client-side validation through the jQuery validation plugin.
EDIT 2: I didn’t mean it would become a discussion about whether I should do any checks ... I just wanted to know if there is any good reason to accept underscores, for example, I have to accept Irish people or hyphen. Based on this, I accept Oren's answer.
source
share