سؤال

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

هل كانت مفيدة؟

المحلول

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" />
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top