Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Default Phone number validation in RTM forms

(0) ShareShare
ReportReport
Posted on by 64
I'm starting to transition our forms to RTM, and when i tried to use the default phone number validation I'm not able to actually submit a valild phone number. Below is the regular expression value I pulled from the html.  Does anyone know what phone number format this is trying to get as 555-555-5555 didn't work. 
^(//+[(]?[0-9]{1,4}|[(]?00[0-9]{0,2}|[(]?011[0-9]?|[(]?010[0-9]?)[)]?([ //-()]*[0-9][ //-()]*){3,16}$
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Default Phone number validation in RTM forms
    Hi,
     
    This regular expression corresponds to a phone number in the format:
    The phone number is spliced from two sets of digits.
    The first set of digits has four cases:
    Case 1:
    +(1 to 4 digits) ,'(' and ')' are optional.
    Example: +1, +(1234)
    Case 2:
    00(0 to 2 digits) ,'('and')' are optional.
    Example: 00, 00(), 00(1)
     
    Case 3:
    (011 One digit optional), '('and')' are optional.
    Example: 011, 0111, (011), (0111)
     
    Case 4:
    (010 One digit optional), '('and')' are optional.
     Example: 010, 0101, (010), (0101)
     
    Spaces, dashes, and parentheses can be inserted between the second set of digits. The quantity of these three types of characters to be inserted: 0 or more. The second group has no less than 3 and no more than 16 digits.
    For example: 555, 555-555-5555, 555 555 5555, 555-555 5555
     
    Therefore, the complete example of a phone number is as follows:
    +(1234)555-555-5555, 00555-555-5555, 011 555-555-5555, 010-555-555-5555
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me.

    Best Regards,
    Dengliang Li

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans