Constructor
new OO.ui.mixin.RequiredElement([config])abstract
#
RequiredElement is mixed into other classes to provide a required
attribute.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Source:
required
attribute.
Methods
isRequired() → {boolean}
#
required
.
setRequired(state) → {OO.ui.Widget}chainable
#
Set the required
state of the input.
Parameters:
Name | Type | Description |
---|---|---|
state |
boolean | Make input required |
- Source:
Returns:
The widget, for chaining
- Type
- OO.ui.Widget
required
state of the input.
setRequiredElement($required)
#
Set the element which can take the required attribute.
This method is used to retarget a RequiredElement mixin so that its functionality applies to the specified element. If an element is already set, the mixin’s effect on that element is removed before the new element is set up.
Parameters:
Name | Type | Description |
---|---|---|
$required |
jQuery | Element that should use the 'required' functionality |
- Source: