* Validation function for `value` and `defaultValue`. * @private
(inst, props)
| 7760 | * @private |
| 7761 | */ |
| 7762 | function checkSelectPropTypes(inst, props) { |
| 7763 | var owner = inst._currentElement._owner; |
| 7764 | LinkedValueUtils.checkPropTypes('select', props, owner); |
| 7765 | |
| 7766 | for (var i = 0; i < valuePropNames.length; i++) { |
| 7767 | var propName = valuePropNames[i]; |
| 7768 | if (props[propName] == null) { |
| 7769 | continue; |
| 7770 | } |
| 7771 | if (props.multiple) { |
| 7772 | "development" !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined; |
| 7773 | } else { |
| 7774 | "development" !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined; |
| 7775 | } |
| 7776 | } |
| 7777 | } |
| 7778 | |
| 7779 | /** |
| 7780 | * @param {ReactDOMComponent} inst |
no test coverage detected