ValidationVisitor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A visitor implementation that interprets ValidationStateDictionary to traverse a model object graph and perform validation.
public ref class ValidationVisitor
public class ValidationVisitor
type ValidationVisitor = class
Public Class ValidationVisitor
- Inheritance
-
ValidationVisitor
Constructors
Properties
AllowShortCircuitingValidationWhenNoValidatorsArePresent |
Obsolete.
Gets or sets a value that determines if ValidationVisitor can short circuit validation when a model does not have any associated validators. |
Cache |
The validator cache. |
Container |
The container. |
Context |
The action context. |
CurrentPath | |
Key |
The key. |
MaxValidationDepth |
Gets or sets the maximum depth to constrain the validation visitor when validating. ValidationVisitor traverses the object graph of the model being validated. For models that are very deep or are infinitely recursive, validation may result in stack overflow.
When not |
Metadata |
The model metadata. |
MetadataProvider |
The model metadata provider. |
Model |
The model. |
ModelState |
The model state. |
Strategy |
The validation strategy. |
ValidateComplexTypesIfChildValidationFails |
Indicates whether validation of a complex type should be performed if validation fails for any of its children. The default behavior is false. |
ValidationState |
The validation state. |
ValidatorProvider |
The model validator provider. |
Methods
GetValidationEntry(Object) |
Get the validation entry for the model. |
SuppressValidation(String) |
Supress validation for a given key. |
Validate(ModelMetadata, String, Object, Boolean, Object) |
Validates a object. |
Validate(ModelMetadata, String, Object, Boolean) |
Validates a object. |
Validate(ModelMetadata, String, Object) |
Validates a object. |
ValidateNode() |
Validates a single node in a model object graph. |
Visit(ModelMetadata, String, Object) |
Validate something in a model. |
VisitChildren(IValidationStrategy) |
Validate all the child nodes using the specified strategy. |
VisitComplexType(IValidationStrategy) |
Validate complex types, this covers everything VisitSimpleType does not i.e. both enumerations and complex types. |
VisitSimpleType() |
Validate a simple type. |