Dela via


MvcOptions.MaxValidationDepth Property

Definition

Gets or sets the maximum depth to constrain the validation visitor when validating. Set to null to disable this feature.

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 null, ValidationVisitor will throw if traversing an object exceeds the maximum allowed validation depth.

public:
 property Nullable<int> MaxValidationDepth { Nullable<int> get(); void set(Nullable<int> value); };
public int? MaxValidationDepth { get; set; }
member this.MaxValidationDepth : Nullable<int> with get, set
Public Property MaxValidationDepth As Nullable(Of Integer)

Property Value

The default value is 32.

Applies to