The ASP.NET MVC 2 modelstate validation checks if a model is valid. You can define a correct model state and check if the users input matches that validation.
Questions tagged [asp.net-mvc-2-validation]
80 questions
1
vote
2 answers
ASP.net validation: why do my DateTime fields also flag up as required?
I'm implementing validation in my web app... the problem is it seems to be over-validating?!
The controller code looks like:
[HttpPost]
[Authentication]
public ActionResult Create([Bind(Exclude = "Id")] CaseInfo caseInfo)
{
if…

laura
- 2,951
- 9
- 44
- 61
1
vote
1 answer
asp.net mvc2 validations
I am using DataAnnotations for validation (including client side)
I have a form with multiple fields. Basic validation for individual fields work fine. Now there are a couple of fields of which atleast one needs to have a value (if there are 3…

byte
- 1,665
- 1
- 19
- 36
1
vote
1 answer
Why do i get input-validation-error class on a textbox because i don't have that class in the whole project?
I have something like this
<%using (Html.BeginForm("X", "Y", FormMethod.Post, new { id="Z" })) { %>
Nr.: | …