So, I am writing a registration form, and I need the display name to be only numbers, letters and underscores. Check out my code and tell me what I'm doing wrong.
<form method="post" action="/" onsubmit="return check_form()">
<input type="text" id="display-name" name="display-name" maxlength="255" />
<input type="submit" />
</form>
<script type="text/javascript">
</script>
Obviously, this was trimmed so as not to include anything that is not related to the problem, but even this fragment does not work.
source
share