ModelMetadata.IsRequired 속성

정의

모델 값이 필요한지 여부를 나타내는 값을 가져옵니다. 현재 instance 속성을 나타내는 경우에만 적용됩니다.

public:
 abstract property bool IsRequired { bool get(); };
public abstract bool IsRequired { get; }
member this.IsRequired : bool
Public MustOverride ReadOnly Property IsRequired As Boolean

속성 값

설명

이 경우 true 모델 값은 유효성 검사기에서 필요한 것으로 간주됩니다.

에 없는 경우 true.기본적으로 암시적 System.ComponentModel.DataAnnotations.RequiredAttribute 가 추가됩니다.

적용 대상