How can I verify that the user fills in the telefon number starting with +46 and not using a 0 after +46
I understand the type tel supports pattern which I understand uses Regex.. See below an example.
Enter your phone number:
Format: 123-456-7890
If you want to use type="tel"
:
<input type="tel" id="phone" name="phone"
pattern="\+46\d{9}"
required>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.