Top "Asp.net-mvc-validation" questions

ASP.

Manually invoking ModelState validation

I'm using ASP.NET MVC 3 code-first and I have added validation data annotations to my models. Here's an example model: …

c# .net asp.net-mvc asp.net-mvc-3 asp.net-mvc-validation
How to create custom validation attribute for MVC

I'd like to create a custom validation attribute for MVC2 for an email address that doesn't inherit from RegularExpressionAttribute but …

asp.net-mvc asp.net-mvc-validation
MVC data annotations range validation not working properly

I have a RangeValidator on a property in my model to only allow Integers that are between 0 and 100. I have …

asp.net-mvc asp.net-mvc-3 jquery-ui data-annotations asp.net-mvc-validation
What does requestValidationMode="2.0" actually do?

I'm trying to solve a "A potentially dangerous Request.Form value was detected from the client" problem, and SO answers …

asp.net-mvc validation asp.net-mvc-3 asp.net-mvc-validation
MVC Razor Validation Errors showing on page load when no data has been posted

I'm messing around with data annotations. When I click on a link to go to a page, the validation messages …

c# asp.net-mvc razor data-annotations asp.net-mvc-validation
ASP.NET MVC TryValidateModel() Issues when Model is Modified

I have a two step form process where the first set of data is stored in session. [IsMp4File] [Required(…

c# asp.net asp.net-mvc asp.net-mvc-2 asp.net-mvc-validation
How to remove required attribute in MVC4, although that has been made required in model

I am not able to do the same thing with string properties. In the below code, I want to remove …

asp.net-mvc-4 asp.net-mvc-validation
Customize the Error Message for an invalid date in ASP.net MVC

I have an ASP.net MVC model with a date: public class EditModel { [Display(Name="DOB")] public DateTime? DateOfBirth { get; …

c# asp.net-mvc asp.net-mvc-validation
ValidationMessageFor with model and html attribute only - MVC 3

Working on a MVC 3 application. I need to add a class to the validation message html. I mean for span …

asp.net-mvc asp.net-mvc-3 asp.net-mvc-validation