MVC: Data Annotations for Model Validation
Required – Indicates that the property is a required field
DisplayName – Defines the text we want used on form fields and validation messages
StringLength – Defines a maximum length for a string field
Range – Gives a maximum and minimum value for a numeric field
Bind – Lists fields to exclude or include when binding parameter or form values to model properties
ScaffoldColumn – Allows hiding fields from editor forms
DisplayName – Defines the text we want used on form fields and validation messages
StringLength – Defines a maximum length for a string field
Range – Gives a maximum and minimum value for a numeric field
Bind – Lists fields to exclude or include when binding parameter or form values to model properties
ScaffoldColumn – Allows hiding fields from editor forms
浙公网安备 33010602011771号