title: MVC 4: How to use the "partial validation" technique?
body: <p>I'd need to implement the "partial validation technique" on MVC 4, as reported in <a href="https://stackoverflow.com/a/8183583/1129461">this answer</a> too:</p>
  
  <pre><code>      public class DontValidateEmailAttribute : ActionFilterAttribute 
           {  public override void OnActionExecuting(ActionExecutingContext filterContext) 
                   {
                      var modelState = filterContext.Controller.ViewData.ModelState;     
                      var incomingValues = filterContext.Controller.ValueProvider;    
                      var key = modelState.Keys.Single(x =&gt; incomingValues.Equals("Email"));
                      modelState[key].Errors.Clear();  
                    }
            }
  </code></pre>
  
  <p>But I get the following <strong>compile error</strong>: "<code>'System.Collections.Generic.ICollection&lt;string&gt;' does not contain a definition for 'Single' and no extension method 'Single' accepting a first argument of type 'System.Collections.Generic.ICollection&lt;string&gt;' could be found (are you missing a using directive or an assembly reference?)</code>..."</p>
  
  <p>THX</p>