Using Validation Settings for SharePoint 2016 Apps

By Rosemarie Withee, Ken Withee

Validation is a formula or statement that must evaluate to TRUE before the data can be saved. SharePoint 2016 has two different types of validation: column-level and app-level validation. The difference between column and app validation is that column validation compares only the data in that single column to some test, such as whether a discount is less than or equal to 50%.

= [Discount] < = .50

On the other hand, validation settings in the app level compare two or more columns to evaluate to TRUE. You can set a rule that [Discount] < [Cost] so customers don’t get an item for free (or get money back!) because they buy an item with a discount.

To use validation settings, follow these steps:

  1. Click the Validation Settings link in the Library Settings or List Settings page.
    The Validation Settings page has two sections, Formula and User Message. The Formula section is the test your comparison of the columns must pass for the item to be valid. The User Message section is what the user receives if the test fails. Users can then adjust the values until the test passes.
  2. Create a formula for the validation by entering it in the Formula field.
    The formula needs to compare (or validate) one or more columns in your app. The App Settings page provides an example and a link to learning more about the proper syntax.
    A selection list of columns in your app is available for use in your formula.
  3. In the User Message text box, enter a message to be shown to users who enter an invalid item.
  4. Click OK or Cancel.
    If you click OK, your validation is applied to your list.

Validations aren’t retroactive. They apply only to new and modified entries on the specified columns.