JSFiddle - React, Tailwind, and code Playground

by lvo811

HTML

<script>
    function alphanumericValidate(e) {
    e = e || window.event;
    var v = e.keyCode;
    return (v >= 48 && v <= 57 || v >= 65 && v <= 90 || v >= 97 && v <= 122 || v == 8);
}
</script>
Enter letters and numbers only
<input onkeydown="return alphanumericValidate(event)">