IsRequired Property
Collapse the table of content
Expand the table of content

ModelValidator.IsRequired Property


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

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

public virtual bool IsRequired { get; }

Property Value

Type: System.Boolean

true if the model property is required; otherwise, false.

Return to top
© 2016 Microsoft