ObjectModelValidator Class

Definition

Provides a base IObjectModelValidator implementation for validating an object graph.

public ref class ObjectModelValidator abstract : Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IObjectModelValidator
public abstract class ObjectModelValidator : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator
type ObjectModelValidator = class
    interface IObjectModelValidator
Public MustInherit Class ObjectModelValidator
Implements IObjectModelValidator
Inheritance
ObjectModelValidator
Implements

Constructors

ObjectModelValidator(IModelMetadataProvider, IList<IModelValidatorProvider>)

Initializes a new instance of ObjectModelValidator.

Methods

GetValidationVisitor(ActionContext, IModelValidatorProvider, ValidatorCache, IModelMetadataProvider, ValidationStateDictionary)

Gets a ValidationVisitor that traverses the object model graph and performs validation.

GetValidationVisitor(ActionContext, IModelValidatorProvider, ValidatorCache, IModelMetadataProvider, ValidationStateDictionary)

Gets a ValidationVisitor that traverses the object model graph and performs validation.

Validate(ActionContext, ValidationStateDictionary, String, Object)

Validates the provided object.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata)

Validates the provided object model. If model is null and the metadata's IsRequired is true, will add one or more model state errors that Validate(ActionContext, ValidationStateDictionary, String, Object) would not.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object)

Validates the provided object model. If model is null and the metadata's IsRequired is true, will add one or more model state errors that Validate(ActionContext, ValidationStateDictionary, String, Object) would not.

Applies to