vendredi 11 mai 2018

html pattern attribute

I'm trying to limit my text input to only allow letters, not numbers. With a maximum of 100 characters. I'm having trouble finding out how to use the pattern attribute to only allow letters. Here is a portion of my code attempting this.

<form action="http://www.severien.com/grit/formecho.php" method="post" target="_blank">
        <label for="videorequests"> Video Requests:</label>
        <input type="text" id="videorequests" name="videorequests" maxlength="100" pattern="[a-z]{1,100}" />
        <input type="submit" value="Submit" class="submitbutton" />
    </form>

Using the attribute maxlength I'm limiting the character input to 100. How do I use pattern to limit the character use to only letters, excluding numerical characters?

Aucun commentaire:

Enregistrer un commentaire