Skip to content

Commit 9e1f878

Browse files
committed
Add required prop to Select
1 parent f64c56d commit 9e1f878

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/input/Select.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ Select.propTypes = {
139139
*/
140140
disabled: PropTypes.bool,
141141

142+
/**
143+
* This attribute specifies that the user must fill in a value before
144+
* submitting a form. It cannot be used when the type attribute is hidden,
145+
* image, or a button type (submit, reset, or button). The :optional and
146+
* :required CSS pseudo-classes will be applied to the field as appropriate.
147+
* required is an HTML boolean attribute - it is enabled by a boolean or
148+
* 'required'. Alternative capitalizations `REQUIRED`
149+
* are also acccepted.
150+
*/
151+
required: PropTypes.oneOfType([
152+
PropTypes.oneOf(['required', 'REQUIRED']),
153+
PropTypes.bool
154+
]),
155+
142156
/**
143157
* Apply valid style to the Input for feedback purposes. This will cause
144158
* any FormFeedback in the enclosing FormGroup with valid=True to display.

0 commit comments

Comments
 (0)