This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | For Each mvp In ModelValidatorProviders.Providers.ToList() | |
| If TypeOf (mvp) Is System.Web.Mvc.DataAnnotationsModelValidatorProvider OrElse | |
| TypeOf (mvp) Is System.Web.Mvc.ClientDataTypeModelValidatorProvider OrElse | |
| TypeOf (mvp) Is System.Web.Mvc.DataErrorInfoModelValidatorProvider Then | |
| ModelValidatorProviders.Providers.Remove(mvp) | |
| End If | |
| Next | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | if (!ModelState.IsValid) | |
| { | |
| var sb = new System.Text.StringBuilder(); | |
| Dictionary<string, IEnumerable<Exception>> errorList = ModelState.ToDictionary( | |
| kvp => kvp.Key, | |
| kvp => kvp.Value.Errors.Select(e => e.Exception) | |
| ); | |
| sb.AppendLine("Exceptions:"); |