MCPcopy Create free account
hub / github.com/docker/getting-started / validate

Function validate

app/src/static/js/react-bootstrap.js:1441–1454  ·  view source on GitHub ↗
(props, propName, componentName, location, propFullName)

Source from the content-addressed store, hash-verified

1439}
1440
1441function validate(props, propName, componentName, location, propFullName) {
1442 var propValue = props[propName];
1443 var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
1444
1445 if (_react2.default.isValidElement(propValue)) {
1446 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
1447 }
1448
1449 if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
1450 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
1451 }
1452
1453 return null;
1454}
1455
1456exports.default = (0, _createChainableTypeChecker2.default)(validate);
1457module.exports = exports['default'];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…