문제

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