When it comes to forms, it is usually important to ensure that the correct type of information is collected in each form field. In InfoPath, fields can be configured to be required or to only allow certain types of information, such as numbers. In addition, we can use validation rules to ensure the data entered meets the specified requirements, such as being a number greater than the number entered into the previous field.
In this recipe, we will create a required field that only allows whole numbers between 10 and 20.
Follow these steps to create a required field with a validation rule:
Create a new form template or open an existing one in Microsoft InfoPath Designer 2013.
Add a Text Box control to the form.
Navigate to CONTROL TOOLS | PROPERTIES and with the Text Box control selected, change Data Type to Whole Number (Integer) as shown in the following screenshot:
Select Field Properties from the Properties section of the ribbon.
Select the Cannot...