I am currently working on creating my own input
tag with a field specifically for phone numbers:
<base-input
style="margin-bottom: 15px; width: 100%; max-width: 510px;"
v-model="phone"
type="tel"
placeholder="Mobile phone"
/>
I am looking to restrict the allowed symbols to only digits (0-9) and the plus symbol (+). I have attempted using pattern="[0-9]+"
, but this approach did not yield the desired results. I also understand that regular expressions can accomplish this, but I need guidance on how to implement them in this scenario.