vendredi 27 janvier 2023

how do I get an input field in html to ensure the pattern contains a specific country code eg 1472 followed by 3 number and then 4 numbers

I have different sign up pages that load for different countries, and I need the telephone input to be for that specific country, such as on one page it needs to be the country code 1234 followed by any 3 numbers and then any 4 numbers. so I need the pattern for the input in the html form. I am dealing with it on the server side with PHP, but I want to handle it on the client side via the input restriction pattern, as to be more efficient. Im sure its really simple but I cant seem to find a simple solution. thanks for your help

i tried the pattern restriction, i casn get the any 4 number, space, any 3 number, space any 4 numbers. but i could not get the: '1234' specific number, space, any 3 number, space, any 4 numbers.

Aucun commentaire:

Enregistrer un commentaire