0

For first validation of an input in HTML5 I want to use the pattern attribute. What I have so far is:

<INPUT name="firstname" type="text" pattern="[A-Za-z]{2,}" title="2 more characters">

How can I include names that contain other UTF-88 characters but no special signs like question marks, commas and so on?

I think its clear what I want. The user should be able to type only valid first names. That includes "ü", "ñ" and many others.

RonRonson
  • 13
  • 4
  • Of course I meant UTF-8 – RonRonson May 12 '19 at 23:54
  • Could you specify which other non-alphabetic characters you want to include? Or do you mean that you only want to include alphabetic characters? – Mr.C May 13 '19 at 00:58
  • All UTF-8 alphabetic characters, space and '-' – RonRonson May 13 '19 at 04:24
  • Possible duplicate of [Only allow certain characters to be entered in html textinput](https://stackoverflow.com/questions/16434174/only-allow-certain-characters-to-be-entered-in-html-textinput) – Ramlal S May 13 '19 at 05:47
  • No, its not because i have to include all UTF-8 alphabetic characters. That includes i.e. "ü", "ñ" and many others. – RonRonson May 13 '19 at 05:54
  • Aside of that the suggested "possible duplicate" is javascript and I dont want to use that for this specific form. – RonRonson May 13 '19 at 06:04
  • check only HTML input - js is 2nd level of validation in that question – Ramlal S May 13 '19 at 06:11

0 Answers0