Share via


ValidationOptions Class

Definition

Provides configuration options for the validation system.

public ref class ValidationOptions
public class ValidationOptions
type ValidationOptions = class
Public Class ValidationOptions
Inheritance
ValidationOptions

Constructors

ValidationOptions()

Properties

MaxDepth

Gets or sets the maximum depth for validation of nested objects. This prevents stack overflows from circular references or extremely deep object graphs. Default value is 32.

Resolvers

Gets the list of resolvers that provide validation metadata for types and parameters. Resolvers are processed in order, with the first resolver providing a non-null result being used.

Methods

TryGetValidatableParameterInfo(ParameterInfo, IValidatableInfo)

Attempts to get validation information for the specified parameter.

TryGetValidatableTypeInfo(Type, IValidatableInfo)

Attempts to get validation information for the specified type.

Applies to