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

With 10 years of software development and support experience in the information technology industry, Paul has a proven track record in delivering swift, accurate results on multiple client engagements. He has developed cutting-edge web and client/server applications, E-Commerce customizations, and industry-specific solutions for clients. Currently working at the Government of...
Read more



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

%d bloggers like this: