brunoacb21 Posted May 12, 2019 Share Posted May 12, 2019 Can someone help me with this? Im a little lost because i want to change that input to one that lets you insert numbers on it. That one doesnt. Thanks in advance. <input name="txtName" type="text" id="txtName" class="" autocomplete="off" value="" required="" placeholder="" data-regex="^[a-zA-Z]{0,10}$" regex="^[a-zA-Z]{0,10}$" maxlength="10"> Link to comment Share on other sites More sharing options...
dsonesuk Posted May 12, 2019 Share Posted May 12, 2019 IF this is done through JavaScript you need to provide code. IF HTML5 attribute pattern which works for modern browsers you can use pattern="[a-zA-Z0-9]+" Which allows alphanumeric characters only, (no special characters) uppercase and lower Link to comment Share on other sites More sharing options...
ishan_shah Posted May 17, 2019 Share Posted May 17, 2019 Hello, I think you should try as per the following way: <input name="txtName" type="text" id="txtName" class="" autocomplete="off" value="" required="" placeholder="" pattern="[a-zA-Z0-9]+" maxlength="10"> Link to comment Share on other sites More sharing options...
shaili_shah Posted July 31, 2019 Share Posted July 31, 2019 Try this: <input name="txtName" type="text" id="txtName" pattern="[a-zA-Z0-9]+" maxlength="10"> Link to comment Share on other sites More sharing options...
dsonesuk Posted July 31, 2019 Share Posted July 31, 2019 Erk polly's what a cracker. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now