regex - html5 pattern for first and last name -
I have an input box where the user can input first name and last name I used the html5 pattern for verification .
But when you insert "Simon" it's okay, but if you type "Simon Simon" then this is not (maybe the problem is between two words).
1. Username
2. First and last names.
My code is
& lt; "Id =" user_full_name "onfocus =" this.value = '' onblur = "" (This.value == '')? This.value = 'First name lastname': this.value; "value =" First name Last name "required />
1. What's the first name? Do you mean a given name? If so, please remember that only one part of the global population writes the name of their family in the form of last names. You should actually use the word "given name" and "family name". Think about »AI Weiwei« A ???? Family name is »AI«. 2. There are so many options for the name [a-zA-Z] does not cover all North American or European names (think about O & OL). Family names may also contain a space character (such as «in a Mac acid attack«). Living with Latin, what about accents or umlauts about French, Spanish or German names? And what about non-Latin names? You know Ð ?? Ð »Ð ° Ð'и ¼ Ð-ÑÑ ?? Ð ?? Ñ ?? Ñ? и ½? 3. You really should use two specific input fields. Irregulars Do not use any regular expression as a person's name.
Comments
Post a Comment