0 votes

Good afternoon,

I've been asked to change our phone number fields to be E.164 compliant. I have come up with the following Regular Expressions for the Phone (with extension), Fax, and mobile device numbers. I wanted to check with the experts here that the regular expressions made sense before applying them.

I am also wondering if changing the property patterns to accept E.164 and not the current format will cause any issues. Will the users lose data, or will the property pattern simply take effect next time the user changes their number?

The current Regular expressions, resulting in a phone number format of 555.123.4567 ext 12345

([\]{1}[0-9]{3}[\]{1}[\.]{1}[0-9]{3}[\.]{1}[0-9]{4}([\ ]{1}[\bext\b]{3}[\ ]{1}[0-9]{3,5})?)$

I'll be changing the expression to the following, to result in a format of 15551234567 ext 12345

/^\+?[1-9]\d{1,14}([\ ]{1}[\bext\b]{3}[\ ]{1}[0-9]{3,5})?
by (170 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

The following expression should do the job:

^\+?\d{11} ext \d{5}$

Will the users lose data, or will the property pattern simply take effect next time the user changes their number?

The users won't lose their data, but the next time they try to modify their phone number, they will be forced to use the new format. Also, if the Telephone Number field is present anywhere on the Web Interface page for modifying users, users will be forced to adjust the telephone number to the new format even if they don't modify it. When you modify a user via the Web Interface, all values present on the page are checked against Property Patterns.

Related questions

0 votes
1 answer

Hi, I want to format all existing entries in "telephone number" to the E.164 without exporting and importing a list. At the moment we have the following formats: +49123456789 ... by default +49 123 456 789 How can I catch this with a scheduled task? Thanks

asked Feb 28, 2023 by boris (550 points)
0 votes
1 answer

Hello, Is it possible with a script to generate a username with a sequential number affixed? Such as first initial, last initial and a sequential 5 digiit number starting ... number script but I am unsure how Adaxes stores the last number used. Thanks!

asked Sep 30 by curtisa (290 points)
0 votes
1 answer

When adding Mobile Phone to a custom form, it seems to also inlcude "Mobile Phone (Other)" which we do not want visible in the form. Is there a way to separate the two or simply hide Mobile Phone (Other)?

asked Nov 11 by msheppard (660 points)
0 votes
0 answers

In user details or user details column, can we give visibility to our admins for SSPR Phone number and email used to do self-service pwd reset, and also the status. It can be through a report or available as a column.

asked Jan 4, 2023 by mchaudh (40 points)
0 votes
1 answer

To avoid typos at the user creation, I want if it is possible to define der Property "IP Phone" by default as the last 4 digits of the property "Telephone Number" ? Thanks

asked Oct 11, 2022 by boris (550 points)
3,589 questions
3,278 answers
8,303 comments
548,148 users