Top "Data-annotations" questions

Data Annotations are used by frameworks such as ASP.

Best Practices ViewModel Validation in ASP.NET MVC

I am using DataAnnotations to validate my ViewModel on client side with jquery.validate.unobtrusive and on server side in …

c# asp.net-mvc validation data-annotations unobtrusive-validation
Password DataAnnotation in ASP.NET MVC 3

Possible Duplicate: Password validation (regex?) I am working on asp.net MVC 3 application and I have applied [Required] [StringLength(100, ErrorMessage = "…

asp.net-mvc-3 data-annotations
DataAnnotation to compare two properties

Is there any way of using data annotations to compare two form field (eg. to confirm an email address) are …

c# .net asp.net-mvc asp.net-mvc-4 data-annotations
What is use of UIHint attribute in MVC

Can anyone please explain me what is the use of UIHint attribute in MVC . Why do we need this. and …

.net asp.net-mvc data-annotations asp.net-mvc-uihint
Understanding ValidationContext in DataAnnotations

I want to utilize Validator.TryValidateValue() but don't understand the mechanics. Say, i have the following: public class User { [Required(…

.net validation .net-4.0 data-annotations
MVC 5 Remote Validation

I need to validate an input field value from user before the form is submitted. I have created an action …

validation asp.net-mvc-5 data-annotations remote-validation
Required attribute for an integer value

I have a viewmodel with an Id property [Required] public int Id { get; set; } But I think this attribute is …

asp.net-mvc data-annotations
How do Data Annotations work?

I use Data Annotations in my ASP.NET MVC 3 project to validate the model. These are extremely convenient but currently …

c# asp.net-mvc validation asp.net-mvc-3 data-annotations
Remote Validation in ASP.Net MVC 3: How to use AdditionalFields in Action Method

I've been using the new ASP.Net MVC 3 RemoteAttribute to send a remote call to an action method that had …

asp.net-mvc validation data-annotations
Validating DataAnnotations with Validator class

I'm trying to validate a class decorated with data annotation with the Validator class. It works fine when the attributes …

c# .net validation .net-4.0 data-annotations