Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

During validation in DefaultBodyModelValidator if the modelAccessor of a model throws, it is not handled. #1206

Closed
sornaks opened this issue Sep 30, 2014 · 1 comment

Comments

@sornaks
Copy link

sornaks commented Sep 30, 2014

In WebApi this was handled by a ignoring validation for a hand-picked set of types and ignoring thrown exceptions. Should we stick to the same list? (The list seem to have been updated whenever a user reported a specific type is throwing.) Should we adopt a better way of handling this?
One thought after discussing with @pranavkm - Should we add a [DoNotValidate] attribute which ignore validation for the particular property and its children?

@danroth27 danroth27 added this to the 6.0.0-beta1 milestone Oct 8, 2014
sornaks pushed a commit that referenced this issue Oct 13, 2014
Fix: Introducing ExcludedValidationTypes in MvcOptions so that the user can exclude types which throw during Validation.
sornaks pushed a commit that referenced this issue Oct 14, 2014
Fix: Introducing ExcludedValidationTypes in MvcOptions so that the user can exclude types which throw during Validation.
sornaks pushed a commit that referenced this issue Oct 15, 2014
Fix: Introducing ExcludedValidationTypes in MvcOptions so that the user can exclude types which throw during Validation.
sornaks pushed a commit that referenced this issue Oct 16, 2014
Fix: The MvcOptions takes in a list of Func<Type,bool>. This func verifies if the type is excluded in validation or not.
sornaks pushed a commit that referenced this issue Oct 16, 2014
Fix: The MvcOptions takes in a list of Func<Type,bool>. This func verifies if the type is excluded in validation or not.
sornaks pushed a commit that referenced this issue Oct 16, 2014
Fix: The MvcOptions takes in a list of ExcludeFromValidationDelegate (Func<Type,bool>). This func verifies if the type is excluded in validation or not.
@sornaks
Copy link
Author

sornaks commented Oct 16, 2014

Checked in. 53379e4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants