{"id":2359,"date":"2011-11-08T10:18:25","date_gmt":"2011-11-08T02:18:25","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=2359"},"modified":"2023-07-31T11:40:26","modified_gmt":"2023-07-31T03:40:26","slug":"sharepoint-validations","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/sharepoint-validations\/","title":{"rendered":"SharePoint Validations"},"content":{"rendered":"<p>SharePoint 2010 introduces two new validation types for lists. One type for column validation which applies a validation check against the current column only. A second type for the list item that provides a comparison of values from more than one column.<\/p>\n<p><strong>Column Validation<\/strong><\/p>\n<p>With SharePoint 2007, Microsoft provides validation settings for columns. The most common validation is the <strong>Required<\/strong> validation, and for some column types a <strong>Rang<\/strong> validation is provided, such as Number or Currency column. Now, with SharePoint 2010, user can define a formula to validate the column; this formula cannot refer to other columns though.<\/p>\n<p>The following will illustrate how to use these validations in columns.<\/p>\n<p><em>Required validation:<\/em><\/p>\n<p>Required validation setting can be found in most column types, and this setting applies when the user tries to create or to modify an item.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.1-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2360\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.1-SP-Validation.png\" alt=\"\" width=\"618\" height=\"104\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.1-SP-Validation.png 618w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.1-SP-Validation-300x50.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><\/p>\n<p>Once the <em>Yes<\/em> option is selected, content will be required for the column when user creates or edits items, and there will be an asterisk next to the column name.<\/p>\n<p>If the required column is left with no input, a validation message will be displayed as follows when user tries to submit the item:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.2-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2361\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.2-SP-Validation.png\" alt=\"\" width=\"1124\" height=\"116\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.2-SP-Validation.png 1124w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.2-SP-Validation-300x30.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.2-SP-Validation-1024x105.png 1024w\" sizes=\"(max-width: 1124px) 100vw, 1124px\" \/><\/a><\/p>\n<p><em>Range validation:<\/em><\/p>\n<p>Range validation is provided for numeric columns, such as Number and Currency.<\/p>\n<p>For Number and Currency columns, administrator can specify the minimum and maximum value.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.3-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2362\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.3-SP-Validation.png\" alt=\"\" width=\"715\" height=\"118\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.3-SP-Validation.png 715w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.3-SP-Validation-300x49.png 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<p>Users will not be allowed to submit items if the input value is beyond the specified scope, and will receive a validation message as follows:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.4-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2363\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.4-SP-Validation.png\" alt=\"\" width=\"1098\" height=\"108\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.4-SP-Validation.png 1098w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.4-SP-Validation-300x29.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.4-SP-Validation-1024x100.png 1024w\" sizes=\"(max-width: 1098px) 100vw, 1098px\" \/><\/a><\/p>\n<p><em>Formula validation:<\/em><\/p>\n<p>SharePoint 2010 extends the validation options by allowing users to define a formula to validate a column. The formula must return a true or false value and cannot refer to other fields in the list.<\/p>\n<p>For Single Line of Text, if you want to input a title which begins with specified characters, you can set the formula as the following:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.5-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2364\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.5-SP-Validation.png\" alt=\"\" width=\"1160\" height=\"563\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.5-SP-Validation.png 1160w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.5-SP-Validation-300x145.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.5-SP-Validation-1024x496.png 1024w\" sizes=\"(max-width: 1160px) 100vw, 1160px\" \/><\/a><\/p>\n<p>Fill the value begin with &#8220;order-&#8220;, it will pass the validation.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.6-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2365\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.6-SP-Validation.png\" alt=\"\" width=\"1140\" height=\"104\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.6-SP-Validation.png 1140w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.6-SP-Validation-300x27.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.6-SP-Validation-1024x93.png 1024w\" sizes=\"(max-width: 1140px) 100vw, 1140px\" \/><\/a><\/p>\n<p>Also, the formula supports TODAY(), NOW() functions.<\/p>\n<p>Another example, if Administrator wants <em>Due Date<\/em> to be after Today, he can type the following formula:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.7-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2366\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.7-SP-Validation.png\" alt=\"\" width=\"623\" height=\"483\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.7-SP-Validation.png 623w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.7-SP-Validation-300x232.png 300w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/><\/a><\/p>\n<p>The following picture shows the result of attempting to enter an invalid date.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.8-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2367\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.8-SP-Validation.png\" alt=\"\" width=\"862\" height=\"109\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.8-SP-Validation.png 862w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.8-SP-Validation-300x37.png 300w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/a><\/p>\n<p><em>Other validations:<\/em><\/p>\n<p>For some columns, SharePoint provides other validations beside the previously mentionned, such as a possibility to define the maximum length for Single Line of Text column.<\/p>\n<p>When creating a Single line of text column, users can find the setting <em>Maximum number of characters<\/em> in <em>Additional Column Settings<\/em> section.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.9-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2368\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.9-SP-Validation.png\" alt=\"\" width=\"461\" height=\"111\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.9-SP-Validation.png 461w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.9-SP-Validation-300x72.png 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/a><\/p>\n<p>Once a value for the maximum number of characters has been specified, users cannot input the exceeding characters in the column.<\/p>\n<p>For Person or Group column, administrator can constrain users to only type user or group from specified SharePoint group in the column.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.10-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2369\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.10-SP-Validation.png\" alt=\"\" width=\"582\" height=\"276\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.10-SP-Validation.png 582w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.10-SP-Validation-300x142.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/a><\/p>\n<p>This means if the user or group is not a specified SharePoint group, it will not be validated as follows:<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.11-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2370\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.11-SP-Validation.png\" alt=\"\" width=\"1126\" height=\"130\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.11-SP-Validation.png 1126w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.11-SP-Validation-300x34.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.11-SP-Validation-1024x118.png 1024w\" sizes=\"(max-width: 1126px) 100vw, 1126px\" \/><\/a><\/p>\n<p>In the above example, you require a user or group which is member of Approvers group.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.12-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2371\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.12-SP-Validation.png\" alt=\"\" width=\"1129\" height=\"471\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.12-SP-Validation.png 1129w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.12-SP-Validation-300x125.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.12-SP-Validation-1024x427.png 1024w\" sizes=\"(max-width: 1129px) 100vw, 1129px\" \/><\/a><\/p>\n<p><strong>List validation<\/strong><\/p>\n<p>Validation for item is a new feature introduced with SharePoint 2010.<\/p>\n<p>A validation expression at the list level is a formula that can include any of the columns in the list and resolves as either True or False. In order to save an item in the list, this expression must resolve to True.<\/p>\n<p>For example, you have two Date and time columns in Task list, Due Date and Start Date; you want to make sure users enter a bigger value in the Due Date column than the Start Date. This functionality can be achieved by using the validation setting at list level rather than column level.<\/p>\n<p>To configure such a validation, follow these steps:<\/p>\n<p>1. Navigate to the list where you want to add a validation, here in the Task list.<\/p>\n<p>2. Enter List Settings &gt; Validation settings.<\/p>\n<p>3. Enter a formula beginning with &#8220;=&#8221;, and make sure it can evaluate to True or False.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.13-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2372\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.13-SP-Validation.png\" alt=\"\" width=\"791\" height=\"725\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.13-SP-Validation.png 791w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.13-SP-Validation-300x274.png 300w\" sizes=\"(max-width: 791px) 100vw, 791px\" \/><\/a><\/p>\n<p>4. Type a description for the validation formula, and save the settings.<\/p>\n<p>Below is the validation message based on the above settings.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.14-SP-Validation.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2373\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.14-SP-Validation.png\" alt=\"\" width=\"1164\" height=\"379\" srcset=\"https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.14-SP-Validation.png 1164w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.14-SP-Validation-300x97.png 300w, https:\/\/www.boostsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/Pic.14-SP-Validation-1024x333.png 1024w\" sizes=\"(max-width: 1164px) 100vw, 1164px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SharePoint 2010 introduces two new validation types for lists. One type for column validation which applies a validation check against the current column only. A second type for the list item that provides a comparison of values from more than one column. Column Validation With SharePoint 2007, Microsoft provides validation settings for columns. The most [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[347],"tags":[237,144,27],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2359"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2359"}],"version-history":[{"count":10,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2359\/revisions"}],"predecessor-version":[{"id":9287,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2359\/revisions\/9287"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}