ObjectModelValidator Class

Definition

Provides a base IObjectModelValidator implementation for validating an object graph.

C#
public abstract class ObjectModelValidator : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator
Inheritance
ObjectModelValidator
Implements

Constructors

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, 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.

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)

Validates the provided object.

Applies to

Product Versions
ASP.NET Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0