title: Overriding Required attribute in view model
body: <p>I have a view model that I'm using for an object represented by my website. Let's call it <code>Student</code>.</p>
  
  <p>I was happy to minimize my application clutter by using the same view model for my Add, Details, and Edit views.</p>
  
  <p>However, some elements should not be editable in the Edit view, things like Password. So I removed these from the view.</p>
  
  <p>However, now <code>ModelState.IsValid</code> reports false on the postback.</p>
  
  <p>Is there a straight forward way to use the same view for all of these views but somehow override the required status for my edit view?</p>
  
  <p><em>Note: I realize I could use hidden fields. But I'm not comfortable sending data such as a password to the client and back. I'd just prefer to not expose it here at all.</em></p>