Regular expression for validating name in javascript

[a-z] : It matches characters from lowercase ‘a’ to lowercase ‘z’. If by mistake, user skips entering any detail, soon the alert message appear on the form.

Here I am giving you the form validation codes in Java Script. These are simple meta characters which do pattern matching. If the entered characters in the field is not in lower case or upper case. When it’s about checking contact field or zip code field, one need to check whether only the number have been entered or not.

And there are no names that use special characters, symbols, or apostrophes?

I think your choice of Reg Ex to validate names is missing the point: this is a huge unwieldy problem and, even if you massively restrict the scope of names you allow, you will forever suffer the risk of false negatives and you will be turning away people from other cultures and languages.

Looking to stop people putting initials in the First / Last name fields, plus any special characters that you would not associate with a name.

I've got something, although it is coming unstuck on names like Mc Gowan or Mac Gowan.

Search for regular expression for validating name in javascript:

regular expression for validating name in javascript-65regular expression for validating name in javascript-34regular expression for validating name in javascript-81regular expression for validating name in javascript-75

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “regular expression for validating name in javascript”

  1. American Kestrels are a declining species throughout much of North America and your assistance to monitor them and provide observations through our interactive website is valuable in helping us to solve the mystery of their decline.