Applying Validation Rules to Local Property using LightSwitch in Visual Studio 2012
In my previous article (http://www.c-sharpcorner.com/UploadFile/18ddf7/creating-a-local-property-in-lightswitch-visual-studio-2012/) I described how to create a Local Property using Light Switch in Visual Studio 2012.
In this article I describe how to apply validations to a Local Property.
Procedure for applying validation rules to a Local Property
Step 1
From the Screen Members List, select the Local Property.
Step 2
Open the property window.
Step 3
In the Property window, expand the "Validation" node if it is not already expanded. However we can apply validation rules depending on the type of the Local Property.
Step 4
If the Local Property must have a value then select the "Is Required" check box.
Step 5
In this article I have used a Local Property of Type String. Hence for a string you might set a Maximum Length property.