MvcOptions.MaxValidationDepth Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.