data-annotations
mvc CompareAttribute not showing up even if referenced System.Web.Mvc
I have a problem using Compare on my model. I want compare two fields, password and confirmpassword respectively and after some thorough search I found out that I can use the \"CompareAttribute\" so I[详细]
2023-03-16 00:38 分类:问答mvc model and viewmodel?
so, i have a \"User\" model that has a lot of fields but following are the impt ones: public int Id {get;set;}[详细]
2023-03-15 20:03 分类:问答Conditional data annotation
Is there a way to make a data annotation conditional?I have a table Party where I store both organisations and persons.If I\'m adding an organisation I don\'t want the field surname to be required, bu[详细]
2023-03-15 08:44 分类:问答MV3 input validation - IE8 & IE9 behave differently
I\'m using DataAnnotations to validate my input fields on a MVC3 application. I\'m using regular expressions validations.[详细]
2023-03-14 03:07 分类:问答Silverlight localized custom validation using DataAnnotations with RIA Services
I\'ve implemented localized validation, client-side, using the DataAnnotations attributes successfully. Now, I want to implement custom validation running server-side using the CustomValidationAttribu[详细]
2023-03-13 21:04 分类:问答Using DataAnnotations (DisplayColumn) in WCF RIA Services
I have created an entity framework 4.0 (DB-First) model, added my partial classes and used DataAnnotations on them to have a perfect UI on the client.[详细]
2023-03-13 07:55 分类:问答Making good use of ASP.NET MVC DataAnnotations with separate assemblies
Let\'s say that I have a Domain assembly that describes the domain model, and it has a class called product:[详细]
2023-03-13 01:31 分类:问答ASP NET 4 How can I use Data Annotations with DataType Password with a MinLength property?
public class ChangePasswordObject { [Required] [DataType(DataType.EmailAddress)] string email; [Required][详细]
2023-03-12 07:21 分类:问答In ASP.NET MVC 3, how can I have variable error messages when the same complex type is used in 2 model properties
I have a problem where I have a Telephone Number class defined as follows: public class TelephoneNumber[详细]
2023-03-12 05:09 分类:问答IIS doesn't recognise view model annotations
I have a basic MVC view model with annotations, for example: [Required(ErrorMessage=\"Your Name Required\")][详细]
2023-03-12 05:02 分类:问答