C# Class MvcContrib.FluentHtml.Behaviors.RequiredCssClassBehavior

Adds a CSS class to the element if the it has an attribute of the specified type or if the model member is a non-nullable value type.
Inheritance: ThreadSafeMemberBehavior
Exibir arquivo Open project: atomicobject/mvccontrib Class Usage Examples

Public Methods

Method Description
RequiredCssClassBehavior ( ) : System

Constructor. Sets "required" as the class to add.

RequiredCssClassBehavior ( string requiredClass ) : System

Constructor

Protected Methods

Method Description
DoExecute ( IMemberElement element ) : void
IsAutomaticallyRequired ( IMemberElement element ) : bool
IsRequired ( IMemberElement element ) : bool

Method Details

DoExecute() protected method

protected DoExecute ( IMemberElement element ) : void
element IMemberElement
return void

IsAutomaticallyRequired() protected method

protected IsAutomaticallyRequired ( IMemberElement element ) : bool
element IMemberElement
return bool

IsRequired() protected method

protected IsRequired ( IMemberElement element ) : bool
element IMemberElement
return bool

RequiredCssClassBehavior() public method

Constructor. Sets "required" as the class to add.
public RequiredCssClassBehavior ( ) : System
return System

RequiredCssClassBehavior() public method

Constructor
public RequiredCssClassBehavior ( string requiredClass ) : System
requiredClass string The class to add for required elements.
return System