I have a username textbox. It should only accept between 3 and 10 characters and it should only accept (0, 9) and (A , Z ) values or maybe (- and _),
nothing more
.
And if the user inputs a value like $%^# it should give an error
I want to do this with PHP, not Jquery. Can anyone help me with this?
I know I can use
<input name="1" type="text" value="1" maxlength="10" />
But it doesn’t give an error to the user and just filters the input value.
Thank you.
regular expression could work