diff --git a/src/isomorphic/classic/types/ReactPropTypes.js b/src/isomorphic/classic/types/ReactPropTypes.js index 4016a206bc..02a8c86ec3 100644 --- a/src/isomorphic/classic/types/ReactPropTypes.js +++ b/src/isomorphic/classic/types/ReactPropTypes.js @@ -146,7 +146,7 @@ function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new Error( - `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.` + `Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside arrayOf.` ); } var propValue = props[propName]; @@ -237,7 +237,7 @@ function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new Error( - `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.` + `Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside objectOf.` ); } var propValue = props[propName]; diff --git a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js index 1b6512c168..e626f99131 100644 --- a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js +++ b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js @@ -142,7 +142,7 @@ describe('ReactPropTypes', function() { typeCheckFail( PropTypes.arrayOf({ foo: PropTypes.string }), { foo: 'bar' }, - 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.' + 'Property `testProp` of component `testComponent` has invalid PropType notation inside arrayOf.' ); }); @@ -473,7 +473,7 @@ describe('ReactPropTypes', function() { typeCheckFail( PropTypes.objectOf({ foo: PropTypes.string }), { foo: 'bar' }, - 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.' + 'Property `testProp` of component `testComponent` has invalid PropType notation inside objectOf.' ); });