model-validation Questions
4
Solved
I'm having trouble with my ASP.NET MVC 3 application. I have 2 propertiesin my model whereby I only want 1 of them required in my view based on whichever one is empty. So for example, if I enter a ...
Omphale asked 23/11, 2011 at 13:18
4
Solved
I am working on a project written on mvc 4 that got several instances of wizard-like behaviour - chain of few views that pass the same half-filled model. Starting from the second view controls are ...
Morphine asked 29/10, 2012 at 13:22
2
Solved
Let's say I have a following ViewModel :
public class PersonViewModel
{
[Required]
public String Email { get; set; }
[Required]
public String FirstName { get; set; }
[Required]
public S...
Extremist asked 28/4, 2013 at 19:40
3
Solved
I found a lot of simulair questions but not a good clean solution that is working. I see a lot of custom code for getting this to work but why is that? Should this not working from the start?
What...
Recommendatory asked 24/8, 2012 at 7:58
1
Solved
I have setup a custom provider to allow setting validation attributes from a data store instead of in static code. Works great with the client side validation in my .NET MVC 4 project, but I am una...
Baa asked 2/8, 2012 at 20:33
1
Solved
My question is hopefully pretty straight forward.
Upon submitting my form, I would like to flag all properties (fields) that have invalid characters (specifically HTML) as model errors.
The issue I...
Unkenned asked 13/2, 2012 at 14:50
3
Solved
using ASP.NET MVC, I have a Model, to which I'm attaching attributes so that I can get use the MVC Model bound validation, but to doesn't this break the rule of MVC, where you are putting items tha...
Kea asked 18/5, 2011 at 14:9
3
Solved
This is a very simple example, but it should be enough to demonstrate my issue. I need to pass a model to my view that the user will update, but the view also needs some other data to create a drop...
Bluebonnet asked 4/3, 2011 at 11:24
2
Solved
I have following property in my Model Metadata class:
[Required(ErrorMessage = "Spent On is required")]
[RegularExpression(@"[0-1][0-9]/[0-3][0-9]/20[12][0-9]",
ErrorMessage = "Please enter date...
Lightening asked 29/8, 2010 at 11:15
1
Solved
Please see the code below. Basically, when the user creates an object of this class, they need to specify the value_type. If value_type==2 (percentage), then percentage_calculated_on (which is a Ch...
Rivulet asked 4/10, 2010 at 8:29
4
Solved
I'm working on a page where the user needs to fill in some information and finally make a selection of 1 or more customers with check-boxes.
The list of customers is an IEnumerable<Customer>...
Dermatoglyphics asked 12/8, 2010 at 14:33
© 2022 - 2024 — McMap. All rights reserved.