DataAnnotationsModelValidator.IsRequired 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會得到一個值,指示模型是否被要求(即屬性中的 Attribute 驗證屬性是否為 RequiredAttribute 屬性)。
public:
virtual property bool IsRequired { bool get(); };
public override bool IsRequired { get; }
member this.IsRequired : bool
Public Overrides ReadOnly Property IsRequired As Boolean
屬性值
true如果需要模型;否則,。 false