IValidatableObject.Validate doesn't get called on parent if validation fails on child

前端 未结 1 1279
南方客
南方客 2021-01-20 17:21

I can\'t find any details on this, but the issue I am having is that Validate function of parent object doesn\'t get called if Validate call fails on any child properties. S

相关标签:
1条回答
  • 2021-01-20 17:48

    According to this code in 2.0.0 branch on GitHub ValidationVisitor will stop validating parent if one of children failed.

    In latest dev branch they introduced new property ValidateComplexTypesIfChildValidationFails to control this behavior.

    Github issue related to this question. It's not clear to me how to set this new property.

    Created new issue on Github to track this issue.

    0 讨论(0)
提交回复
热议问题