Skip to content

Commit 63546ee

Browse files
committed
Add customValidators option to prop-types documentation
1 parent b1a7b0c commit 63546ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/rules/prop-types.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It can warn other developers if they make a mistake while reusing the component
88

99
The following patterns are considered warnings:
1010

11-
```js
11+
```jsx
1212
var Hello = React.createClass({
1313
render: function() {
1414
return <div>Hello {this.props.name}</div>;
@@ -27,7 +27,7 @@ var Hello = React.createClass({
2727

2828
The following patterns are not considered warnings:
2929

30-
```js
30+
```jsx
3131
var Hello = React.createClass({
3232
render: function() {
3333
return <div>Hello World</div>;
@@ -58,12 +58,13 @@ This rule can take one argument to ignore some specific props during validation.
5858

5959
```
6060
...
61-
"prop-types": [<enabled>, { ignore: <ignore> }]
61+
"prop-types": [<enabled>, { ignore: <ignore>, customValidators: <customValidator> }]
6262
...
6363
```
6464

6565
* `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
6666
* `ignore`: optional array of props name to ignore during validation.
67+
* `customValidators`: optional array of validators used for propTypes validation.
6768

6869
### As for "exceptions"
6970

0 commit comments

Comments
 (0)