SharePoint Form Validation supports a client-side validation for SharePoint list field data. SharePoint Form Validation provides 4 standard validation types for input content check when users create a SharePoint list item in New-Form or edit an item in Edit Form. They are Required Validation, Regular Expression Validation, Compare Validation, and Range Validation.
Administrator can configure above four validations and customize warning error messages for most columns in a list. Required Field Validator is used for setting whether some column should not be null. Regular Expression Validator is used to check whether inputted content is against a regular expression. Range Validator makes effect when it is required that some value of data should be in a range. Compare Validator plays an important role when data are set to be compared with each other.
By default, SharePoint can do some simple validations to SharePoint list field data such as "Required Field" on server side when you submit form. But users often need list field data validations of various kinds on client side. For instance, when submitter creates a task and input data in a SharePoint task list form, administrator may want him to be noticed on the client side if the data of "Start Date" column is later than "End Date" column. In such a case, SharePoint Form Validation can help administrators achieve it.
SharePoint Form Validation can be used on almost all kinds of lists. For most columns in a list, users can apply standard validation methods such as "Required Validation", "Compare Validation", "Regular Expression Validation" and "Range Validation" on columns. SharePoint Form Validation can take effect in the SharePoint list item New Form page or Edit Form page.

SharePoint Form Validation provides standard validation methods such as Require, Regular Expression, Range, Compare, when you create or edit a list item in a form. The instruction will show you how to use the SharePoint Form Validation. The following is an "Orders" list in the site.

1. Configure form validation settings
On the Settings menu
, select List Settings. Click "Form validation settings".

The Form Validation Setting page:

Click "Buyer" column. In the configuration page, select "Required Field Validator" checkbox, and type Error Message, then click "OK". It will display the error message when you input nothing on the column.

Next configure the Order No. column.
Select "Regular Expression Validator" checkbox, enter the expression ((\d){4}-(\d){4}-(\d){4}-(\d){4}) and error message. When user's input value does not match with the expression, the error message will display.

Next configure the Product column.
Select "Required Field Validator" checkbox, type the error message, and click "OK".

Next configure the Quantity column.
Select "Range Validator" checkbox, and choose "Type".
Specify the minimum value, maximum value and error message.
When entered value is not in the range, a piece of error message will remind you.

Next configure the E-mail column.
Select "Regular Expression Validator" checkbox, type the regular expression and error message, and click "OK".

Next configure the Order Data column.
Select "Required Field Validator" checkbox, type the error message, and click "OK".

Next configure the Remittance Date column.
Select "Compare Validator" checkbox.
Select Equal or Greater Than in "Operator" dropdown list, and select "Order Date" in "Column To Compare" drop-down list.
(This setting means the Remittance Date must be equal to or greater than the Order Date, or else there will be an error notification displayed in the edit form or new form.)

2. Create a new item to test the form validation setting of the list;
If the contents inputted are not in accordance with settings configured before, error messages display as bellow.

Following picture shows the result if all the validation has been passed.

Top