InfoPath 2013: Custom rule to check and format telephone number

How I want the telephone number formatted: (919) 555-1212


  1. First create a Text(string) Phone Number field. See the Field Properties below for the example.


  2. Click Manage Rules in the ribbon

    Manage Rules

  3. Click the arrow on the New button and then click Action


  4. Click the FX button
  5. Rule_Action_Coditions
  6. Rule_Validation_Coditions

Written by Paul

Amassed 8 years of experience in the information technology field. Extensive hands-on skills attained in a wide range of technologies. Proven ability of delivering fast, accurate results. Worked in various capacities in the information technology field including: programmer, programmer analyst, technical analyst and quality assurance specialist.



How I want the telephone number formatted:

Thank you for posting this. I am trying to add this field to my form but it still allows words to be typed in the field. Any help would be much appreciated. Thanks looking forward to hearing from you.


Hey Fred,

I am not next to a computer right now but I would suggest creating a data validation rule with a custom pattern that only allows the Characters you want. When I get home later I will have a look.


Leave a Reply

Follow me on Twitter

%d bloggers like this: