Browse by Tags

All Tags » Validation (RSS)
The DataTypeAttribute impacts the “data type” of a column. When defined in the database or a programming language, data types are integers, decimals, strings, etc. We use these to hold all kinds of real world types. Each of these real-world data types have differences in their business rules. The user interface should respect these differences by using different data entry controls (like DateTextBox, Calendar, IntegerTextBox, etc) and validators....
Validation attributes focus on evaluating data to report errors. The base class is System.ComponentModel.DataAnnotations.ValidationAttribute. It defines the IsValid() method, which is always overriden to evalutate the data. It also supplies the ErrorMessage property, where you can describe the error reported....
.net 4 introduces the CustomValidationAttribute , a member of System.ComponentModel.DataAnnotations that supports validation of your business logic. Until now, validation rules were limited based on the available attributes (required, stringlength, regex...
A common question on the www.asp.net forums asks how to validate a CheckBoxList control. There are two cases: Require at least one checkbox Require a specific number of checkboxes In the past, I’ve answered this question in a way that now breaks when...
Posted by plblum | 2 comment(s)
More Posts