ljharb / prop-types-tools

Custom React PropType validators
MIT License
671 stars 50 forks source link

[restrictedProps] add ability to overwrite error with custom function #22

Closed brucewpaul closed 7 years ago

brucewpaul commented 7 years ago

This allows you to pass a custom function to restrictedProp that will be shown instead of the default error that is thrown.

@ljharb

lencioni commented 7 years ago

Also, it looks like this change broke tests. Will you please look into that as well?

brucewpaul commented 7 years ago

added tests and bumped the version

@lencioni @ljharb ptal

brucewpaul commented 7 years ago

@ljharb addressed your requests