Top "Data-annotations" questions

Data Annotations are used by frameworks such as ASP.

ASP.Net MVC 3 ViewModel Data Annotations

I am developing an ASP.Net MVC 3 Web application with Entity Framework 4.1 and I am getting a bit confused with …

asp.net-mvc-3 viewmodel data-annotations partial-classes
MVC unobtrusive range validation of dynamic values

I have a value on my model, that must fall within the range of two other values on my model. …

asp.net-mvc asp.net-mvc-3 data-annotations unobtrusive-validation
jQuery unobtrusive validation ignores data-val-required message in MVC3

I have used the method described here to localize my data annotation messages and basically it is working fine in …

jquery asp.net-mvc-3 data-annotations unobtrusive-validation
Rendering a <textarea /> using data annotations

I'd like to render a text area for one of the fields in my model. I've tried applying [DataType(DataType.…

asp.net-mvc asp.net-mvc-4 textarea data-annotations multiline
WPF TextBox MaxLength -- Is there any way to bind this to the Data Validation Max Length on the bound field?

ViewModel: public class MyViewModel { [Required, StringLength(50)] public String SomeProperty { ... } } XAML: <TextBox Text="{Binding SomeProperty}" MaxLength="50" /> Is there any …

c# wpf xaml data-annotations maxlength
What parameters does the stringlength attribute errormessage take?

In the MVC4 template one of the data annotation attributes used is stringlength. For example: [StringLength(100, ErrorMessage = "The {0} must be …

c# asp.net-mvc-4 data-annotations
ASP.NET Core MetaDataType Attribute not working

I'm using the MetaDataType Attribute on my domain model class. It it supposed to move the attribute information from the …

c# asp.net-core data-annotations
Custom model binding, model state, and data annotations

I have a few questions regarding custom model binding, model state, and data annotations. 1) Is it redundant to do validation …

asp.net-mvc validation data-annotations modelbinders modelstate
Is the DataTypeAttribute validation working in MVC2?

As far as I know the System.ComponentModel.DataAnnotations.DataTypeAttribute not works in model validation in MVC v1. For example, …

c# asp.net-mvc validation email data-annotations
Get error message when using custom validation attribute

I'm using the CustomValidationAttribute like this [CustomValidation(typeof(MyValidator),"Validate",ErrorMessage = "Foo")] And my validator contains this code public class …

c# asp.net-mvc asp.net-mvc-3 data-annotations customvalidator