Just like column validation we can have validation formulas at list level. Column validation can only validate the current column and can not perform validation for other columns. For applying validation on multiple columns, you would need SharePoint’s List or Library level validation.

Why need List Validation

There is possibility that data entered in list fields is correct while submitting the form but entered value is not correct if compared with other values in the field.

The simplest is Start Date and End Date fields, user can enter date values properly in both fields but there is possibility of adding wrong date ranges. With the help of List validation, we can compare that End Date must be greater that Start Date.

Applying List Validation

For applying list validation, I have created two columns Start Date and End Date of datetime in my SharePoint lists. Follow below steps to do the list validatioj:

  • Click on Gear icon and go to list settings (for older SharePoint version, select list settings from ribbon)
  • Under General, click on Validation Settings
  • Now select the fields form Insert Pane to the Formula Pane
  • I have added date comparison formula as =[End Date] > [Start Date]
  • Enter validation message in User Message pane.
  • Save the changes

Now go to the list and add new item to validate the working of the list validation.

Adnan is six time Microsoft MVP (Since 2015) with over 16 years of extensive experience with major expertise on SharePoint, SharePoint based development, Microsoft 365, Microsoft Teams, .Net Platform and Microsoft BI. He is currently working Sr Microsoft Consultant at Olive + Goose. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past 12 years and worked on different intranet/intranet solutions for private & govt. sector majorly in United states and Gulf region and have experience of working with multiple Fortune 500 companies. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply