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 (215k 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

We would like to auto enroll our entire company into Adaxes for self service but do not want to use the question/answer format but instead their phone numbers (provided by HR department). Is this possible? Best, Evangelos

asked Oct 1, 2021 by evangelos (60 points)
0 votes
1 answer

Hello, i have a custom command which sets the oof-message for the selected user. in this custom command i have a parameter "param-vertretung" (ad-object picker). Now i want to ... and email of the stand-in in the oof-message. Can you help me with that? Thanks

asked Nov 13, 2020 by lohnag (100 points)
0 votes
1 answer

One of our Server team members has a few questions about the new domain and how Adaxes processes requests from the web interface. We have the AMS and would like to speak to a support person.

asked Mar 2, 2017 by willy-wally (3.2k points)
0 votes
1 answer

I have an issue with how phone numbers are rendered in the Web Interface. My Forms and Views configuration looks like this and when this is rendered in the web interface ... noting that in the other forms Create / modify, the property is handled as expected)

asked Apr 5, 2016 by sam.webster (320 points)
0 votes
1 answer

Hello, I could use some help with a script. The script will need to do a couple of things. 1. Remove all special characters and spaces from %mobile% string, leaving a 10 digit ... I just used a property pattern to give a yes or no value option. Thank You! Ryan

asked Mar 18, 2014 by ryan_breneman (920 points)
2,757 questions
2,491 answers
6,523 comments
1,468,750 users