Created
February 17, 2013 05:45
-
-
Save justin-edwards/4970354 to your computer and use it in GitHub Desktop.
Remove all default ValidationProviders (VB.Net)
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment