Expand my Community achievements bar.

Problem with phonenumber pattern

Avatar

Former Community Member
Hello,



I've got a problem with my display and validation pattern for my phone numbers.



In Holland we have two sorts of phone numbers:

Always 10 numbers, but some regions have a 3 digit area code,

other regions a 4 digit area code.



Example:

012-3456789

0123-456789



This is also the way I want my users to enter the data.



I want to display them as followed:

012-3456789 --> 012 - 345 67 89

0123-456789 --> 0123 - 456 789



My display pattern right now is: text{999 - 999 99 99}|text{9999 - 999 999}

My edit pattern is: text{999-9999999}|text{9999-999999}

My validation pattern is: text{999-9999999}|text{9999-999999}

(With a pop-up message to fill in 10 numbers, area code seperated from the rest by a dash, as in the example)



The problem is that the validation works fine, but it always transforms the phonenumber to the first option (999 - 999 99 99).



How can I fix this?



Greetings and thanks in advance,



Sterre
0 Replies