Partager via


DataAnnotationsModelValidator.IsRequired Property

Gets a value that indicates whether model validation is required.

Namespace:  System.Web.Http.Validation.Validators
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property IsRequired As Boolean
    Get
'Usage
Dim instance As DataAnnotationsModelValidator
Dim value As Boolean

value = instance.IsRequired
public override bool IsRequired { get; }
public:
virtual property bool IsRequired {
    bool get () override;
}
abstract IsRequired : bool
override IsRequired : bool
override function get IsRequired () : boolean

Property Value

Type: System.Boolean
true if model validation is required; otherwise, false.

See Also

Reference

DataAnnotationsModelValidator Class

System.Web.Http.Validation.Validators Namespace