In this post we will discuss how we can do phone number validation in Infopath 2010 in SharePoint 2010. Before this you can also check for email id validation in infopath 2010
. Also you can check my previous posts on:
Follow below steps for Phone number validation in infopath 2010:
1. Add a textbox to the infopath form.
2. Select the textbox and click on Manage Rules, then from the Rules window Select New -> Validation.
3. Give a name in "Details For", here we have given rule as "Rule for Mobile Number Validation".
4. Now click on the condition None, this will open the Condition dialog box, Here First select the control and 2nd Select "does not match pattern" and in the 3rd click on Select a parttern as shown in the fig below:
5. This will open the "Data Entry Pattern" where you can select based on the custom pattern or also you can define a custom pattern as shown in the fig below:
6. Now the condition dialog box should look like below:
7. Now save and publish the form.
8. Now if you will not enter phone number in correct format, then it will show error message like below: