Share via


ModelValidator.IsRequired Property

Gets a value that indicates whether a model property is required.

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

Syntax

'Declaration
Public Overridable ReadOnly Property IsRequired As Boolean
    Get
'Usage
Dim instance As ModelValidator
Dim value As Boolean

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

Property Value

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

See Also

Reference

ModelValidator Class

System.Web.Http.Validation Namespace