Domanda

Can any one suggest how I can create a login validation with alphanumeric characters as an input field. I am trying to use this type of the input tag, but this can only use numbers as input .

input type="number" name="roll number" placeholder="roll number"

How can I define the input field for alphanumeric input fields? example- RNO52

È stato utile?

Soluzione

If you want you can just create a input type of text and write a pattern that it has to match in order to pass validation.

<input type="text" pattern="[a-zA-Z]{2}\d{3}" title="XX999" placeholder="XX999" />
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top