diff --git a/src/utils/childrenValueInputValidation.js b/src/utils/childrenValueInputValidation.js
index 075a4c42b0..ac8af1520a 100644
--- a/src/utils/childrenValueInputValidation.js
+++ b/src/utils/childrenValueInputValidation.js
@@ -2,13 +2,13 @@ import React from 'react';
import { singlePropFrom } from './CustomPropTypes';
const propList = ['children', 'value'];
-const typeList = [React.PropTypes.number, React.PropTypes.string];
export default function valueValidation(props, propName, componentName) {
let error = singlePropFrom(propList)(props, propName, componentName);
+
if (!error) {
- const oneOfType = React.PropTypes.oneOfType(typeList);
- error = oneOfType(props, propName, componentName);
+ error = React.PropTypes.node(props, propName, componentName);
}
+
return error;
}
diff --git a/test/ButtonInputSpec.js b/test/ButtonInputSpec.js
index d196632bfc..f2934fd79c 100644
--- a/test/ButtonInputSpec.js
+++ b/test/ButtonInputSpec.js
@@ -42,8 +42,6 @@ describe('ButtonInput', () =>{
ReactTestUtils.renderIntoDocument(
);
-
- console.warn.called.should.be.false;
});
it('throws warning about wrong type for bsStyle=error', function () {
@@ -72,11 +70,9 @@ describe('ButtonInput', () =>{
assert.notInstanceOf(result, Error);
});
- it('does not allow elements for children', function () {
+ it('allows elements as children', function () {
ReactTestUtils.renderIntoDocument(
blah
);
-
- shouldWarn('propType: Invalid');
});
});
diff --git a/test/FormControlsSpec.js b/test/FormControlsSpec.js
index 31c9941d30..962e0d5433 100644
--- a/test/FormControlsSpec.js
+++ b/test/FormControlsSpec.js
@@ -33,5 +33,11 @@ describe('Form Controls', function () {
result.should.be.instanceOf(Error);
});
+
+ it('allows elements as children', function () {
+ ReactTestUtils.renderIntoDocument(
+ blah
+ );
+ });
});
});