Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
LightSwitch does much of the work for you by allowing you to specify validation rules declaratively through the table designer. Figure 5-2 shows how various aspects of validation can be applied by using the properties pane for a field in a table.
Figure 5-2. Setting validation properties at a field level
Because the field is of data type Double, LightSwitch automatically ensures that only numeric data can be entered. Data type validation will also occur for all other data types that are available in LightSwitch.
Note LightSwitch creates storage constraints for many of these settings. This ensures that validation is also carried out at the server. For example, if the Include in Unique Index check box is selected, a unique index is created in the SQL Server database.