MvcOptions.MaxValidationDepth 속성

정의

유효성 검사 시 유효성 검사 방문자를 제한할 최대 깊이를 가져오거나 설정합니다. 이 기능을 사용하지 않도록 설정하려면 로 null 설정합니다.

ValidationVisitor는 유효성 검사 중인 모델의 개체 그래프를 트래버스합니다. 매우 깊거나 무한히 재귀하는 모델의 경우 유효성 검사를 실행하면 스택 오버플로가 발생할 수 있습니다.

그렇지 않은 nullValidationVisitor 경우 개체를 트래버스하는 것이 허용되는 최대 유효성 검사 깊이를 초과하면 가 throw됩니다.

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)

속성 값

기본값은 32입니다.

적용 대상