IsRequired Property

ModelMetadata.IsRequired Property

.NET Framework 4.6 and 4.5

Gets or sets a value that specifies whether the property is required.

Namespace:   System.Web.ModelBinding
Assembly:  System.Web (in System.Web.dll)

public virtual bool IsRequired { get; set; }

Property Value

Type: System.Boolean

true if the property is required; otherwise, false. The default is true for non-nullable value types and false for all other types.

.NET Framework
Available since 4.5
Return to top
© 2015 Microsoft