top of page

Apply Validation Patterns For Controls In Item View Using K2 Designer In SharePoint 2013 Online

Updated: Mar 18, 2019

Item Views work with a single record of a SmartObject and are bound to the scalar methods of the SmartObject. Item Views can be used to display data (read-only) or capture data for either a new record or editing an existing record. Views are used to design a Form. Please refer my previous article to create Item View using K2 Designer.

Validation Patterns are regular expressions used to enforce validation on a certain control when data is captured. There are several default validation types available. Additional validation patterns can be configured and the validation error message can be customized.

I have a custom list named “K2 Workflow Tutorials” in which I have created an Item View.We will see how to apply validation pattern on a control using K2 Designer.

Navigate to the custom list. Click on List tab and then click on Application button under K2 section in the ribbon interface. Click on New and then click on View.

In the category tree, expand K2 Designer - All Items, SharePoint 2013, then <SiteName>,  Lists, K2 Workflow Tutorials and click My Sample Item View. Click on Edit. A pop up displays to check out the view. Please click on Yes button to check out the view.

I have a text field named “Text Column” for which I am going to apply Email Address validation pattern. Select the control, in the properties tab expand Validation. Click on ellipsis next to pattern.

Select Email Address pattern and then click Ok button. Click Finish button.

Click on Check In to check in the view changes and then click on Run.

If the text entered is not a valid email address then you will get the following error message.



bottom of page