lundi 8 février 2016

Text input limiting to less than 31 (days)

I want to use text input to ask for day in a form, but i dont know how to use this pattern attribute well. Maybe i should use some those regex with less than 31? I dont reallty know how to make one either.

this is how it looks:

<input type='text' name='d' size='2' maxlength='2' value='$d'     pattern='[0-3]{1}[1-9]{1}'  required>  

and i know it would be easier to just use select or number, but i have to do this as text. Please help me, or say it's impossible.

Aucun commentaire:

Enregistrer un commentaire