You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ModelValidation: Fixed MaxDepth exception when there are more items left then MaxValidationDepth after reaching MaxAllowedErrors (#18212)
* Consolidated similar tests in a theory
* Fix for InvalidOperationException when reached maxAllowedErrors and there are more items left then max depth
* Refactored Visitor logic to reduce the risk of a missing Pop.
* Added comment on when it can throw
* Updated reference assembly
* Reverted publid API change
varexpected=$"ValidationVisitor exceeded the maximum configured validation depth '{maxDepth}' when validating property '{nameof(DepthObject.Depth)}' on type '{typeof(DepthObject)}'. "+
1273
1273
"This may indicate a very deep or infinitely recursive object graph. Consider modifying 'MvcOptions.MaxValidationDepth' or suppressing validation on the model type.";
1274
1274
_options.MaxValidationDepth=maxDepth;
@@ -1283,6 +1283,7 @@ public void Validate_Throws_IfValidationDepthExceedsMaxDepth()
varexpected=$"ValidationVisitor exceeded the maximum configured validation depth '{maxDepth}' when validating property '{nameof(DepthObject.Depth)}' on type '{typeof(DepthObject)}'. "+
1313
-
"This may indicate a very deep or infinitely recursive object graph. Consider modifying 'MvcOptions.MaxValidationDepth' or suppressing validation on the model type.";
0 commit comments