0

I am trying to use multiple patterns for an input-field in HTML5.

<input type="text" pattern="\d*.{5,10}" name="plz">

My current input field does not work. Only the second pattern .{5,10} is relevant for the submit. The first attribute \d* hast no effects.

susanloek
  • 361
  • 1
  • 4
  • 18

1 Answers1

-1

Try the below:

<input type="text" placeholder="" class="form-control" pattern="([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{4})([0-9]{1})">

and just accept AESE640526HOCCNL05...

Hope this can help you.

Matt W.
  • 3,452
  • 2
  • 20
  • 41