Home > Blockchain >  Input pattern specific format HTML/JavaScript
Input pattern specific format HTML/JavaScript

Time:09-27

I have a specific format I need in a text box where the user enters a house address for example"45 Ezra ave" The first 3 characters must be numbers followed by a space. The the rest of the string/input can be as many letters as the user needs.

<input id="street address" type="text placeholder="address" name="address"> 

CodePudding user response:

How about this: 2 numbers, followed by a space, followed by one or more of any character:

<input pattern="[0-9]{2} . ">
  • Related