ValidateContext Class

Definition

Represents the context for validating a validatable object.

public ref class ValidateContext sealed
public sealed class ValidateContext
type ValidateContext = class
Public NotInheritable Class ValidateContext
Inheritance
ValidateContext

Constructors

Name Description
ValidateContext()
Obsolete.

Initializes a new instance of ValidateContext.

Properties

Name Description
CurrentDepth

Gets or sets the current depth in the validation hierarchy.

CurrentValidationPath

Gets or sets the prefix used to identify the current object being validated in a complex object graph.

ServiceProvider

Gets or sets the service provider. This will also be made available on the ValidationContext instances.

ValidationErrors

Gets the dictionary of validation errors collected during validation.

ValidationOptions

Gets or sets the validation options that control validation behavior, including validation depth limits and resolver registration.

Methods

Name Description
AddValidationError(ValidationError)

Adds a validation error to ValidationErrors.

Applies to