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
so, i have a \"User\" model that has a lot of fields but following are the impt ones: public int Id {get;set;}
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
I\'m using DataAnnotations to validate my input fields on a MVC3 application. I\'m using regular expressions validations.
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
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.
Let\'s say that I have a Domain assembly that describes the domain model, and it has a class called product:
public class ChangePasswordObject { [Required] [DataType(DataType.EmailAddress)] string email; [Required]
I have a problem where I have a Telephone Number class defined as follows: public class TelephoneNumber
I have a basic MVC view model with annotations, for example: [Required(ErrorMessage=\"Your Name Required\")]