MVC部份属性验证控件
2013-02-04 17:33
288 查看
http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.displayattribute.aspx
The System.ComponentModel.DataAnnotations namespace provides attribute classes that are used to define metadata for ASP.NET MVC and ASP.NET data controls.
Classes
The System.ComponentModel.DataAnnotations namespace provides attribute classes that are used to define metadata for ASP.NET MVC and ASP.NET data controls.
Classes
Class | Description | |
---|---|---|
AssociatedMetadataTypeTypeDescriptionProvider | Extends the metadata information for a class by adding attributes and property information that is defined in an associated class. | |
AssociationAttribute | Specifies that an entity member represents a data relationship, such as a foreign key relationship. | |
BindableTypeAttribute | Specifies whether a type is typically used for binding. | |
CompareAttribute | Provides an attribute that compares two properties. | |
ConcurrencyCheckAttribute | Specifies that a property participates in optimistic concurrency checks. | |
CreditCardAttribute | Specifies that a data field value is a credit card number. | |
CustomValidationAttribute | Specifies a custom validation method that is used to validate a property or class instance. | |
DataTypeAttribute | Specifies the name of an additional type to associate with a data field. | |
DisplayAttribute | Provides a general-purpose attribute that lets you specify localizable strings for types and members of entity partial classes. | |
DisplayColumnAttribute | Specifies the column that is displayed in the referred table as a foreign-key column. | |
DisplayFormatAttribute | Specifies how data fields are displayed and formatted by ASP.NET Dynamic Data. | |
EditableAttribute | Indicates whether a data field is editable. | |
EmailAddressAttribute | Validates an email address. | |
EnumDataTypeAttribute | Enables a .NET Framework enumeration to be mapped to a data column. | |
FileExtensionsAttribute | Validates file name extensions. | |
FilterUIHintAttribute | Represents an attribute that is used to specify the filtering behavior for a column. | |
KeyAttribute | Denotes one or more properties that uniquely identify an entity. | |
MaxLengthAttribute | Specifies the maximum length of array or string data allowed in a property. | |
MetadataTypeAttribute | Specifies the metadata class to associate with a data model class. | |
MinLengthAttribute | Specifies the minimum length of array of string data allowed in a property. | |
PhoneAttribute | Specifies that a data field value is a well-formed phone number using a regular expression for phone numbers. | |
RangeAttribute | Specifies the numeric range constraints for the value of a data field. | |
RegularExpressionAttribute | Specifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression. | |
RequiredAttribute | Specifies that a data field value is required. | |
ScaffoldColumnAttribute | Specifies whether a class or data column uses scaffolding. | |
ScaffoldTableAttribute | Specifies whether a class or data table uses scaffolding. | |
StringLengthAttribute | Specifies the minimum and maximum length of characters that are allowed in a data field. | |
TimestampAttribute | Specifies the data type of the column as a row version. | |
UIHintAttribute | Specifies the template or user control that Dynamic Data uses to display a data field. | |
UrlAttribute | Provides URL validation. | |
ValidationAttribute | Serves as the base class for all validation attributes. | |
ValidationContext | Describes the context in which a validation check is performed. | |
ValidationException | Represents the exception that occurs during validation of a data field when the ValidationAttributeclass is used. | |
ValidationResult | Represents a container for the results of a validation request. | |
Validator | Defines a helper class that can be used to validate objects, properties, and methods when it is included in their associated ValidationAttribute attributes. |
相关文章推荐
- MVC验证13-2个属性至少输入一项
- 验证控件的Display属性意义
- ASP.NET MVC 使用Remote特性实现远程属性验证
- 在写自定义控件时,如果控件某个属性允许被验证控件验证,需要注意微软在 WebUIValidation.js内的实现。
- ASP.NET MVC验证框架中关于属性标记的通用扩展方法
- mvc中动态给一个Model类的属性设置验证
- mvc中服务器端、客户端属性验证
- .net验证控件的属性与使用技巧---总结及正则表达式语法
- mvc中服务器端、客户端属性验证
- 关于控件与验证控件一个不用回传的属性CausesValidation="False"
- MVC中Remote属性验证
- 利用mvc filterconfig属性实现权限验证
- 《ASP.NET MVC验证框架中关于属性标记的通用扩展方法》之继续扩展
- [转][ASP.NET MVC]如何定制Numeric属性/字段验证消息
- [ASP.NET]为什么CustomValidator验证控件在验证DropdownList的时候不能设置ControlToValidate属性
- MVC 中排除不需要的验证属性
- Asp.net 4000 _设置Button属性跳过控件验证
- MVC 验证和异常处理 分开处理Model级别和属性级别验证
- ASP.net MVC 属性验证
- .NET-MVC添加属性验证