Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft