I am using the same model for two views in ASP.NET MVC3 Razor. For example, I had a text box named "First Name". I need validation for this textbox only in one view and not in the other view. I know how to implement this in jquery, but my requirement is different in that, I had to differentiate it either in model or in the action of the particular view.
Some thing like:
[Required(ErrorMessage="First Name is Required")]
public string FirstName { get; set; }
But I'm unable to find out how to differentiate validation for two views in the same model.
Can someone please help me with this?