This validator checks that all of the provided validators pass.
const propTypes = { vertical: React.PropTypes.bool.isRequired, block: all( React.PropTypes.bool.isRequired, ({ block, vertical }) => ( block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null ), ),};
The provided validators will be validated in order, stopping on the first failure. The combined validator will succeed only if all provided validators succeed.
As in the example, this can be used to make a type assertion along with additional semantic assertions.
If the collapsable prop above is specified, this validator will log the warning:
The prop `collapsable` of `MyComponent` is deprecated. Use `collapsible` instead.
This validator warns instead of failing on invalid values, and will still call the underlying validator if the deprecated value is present.
This validator will only warn once on each deprecation. To clear the cache of warned messages, such as for clearing state between test cases intended to fail on deprecation warnings, call deprecated._resetWarned().