Skip to content

Commit f6d724a

Browse files
committed
Add material-ui v4 support
1 parent 74dd4b0 commit f6d724a

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

Readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install react-material-ui-form-validator
1414

1515
### Versions
1616
+ 0.x, 1.x - supports material-ui <= 0.x
17-
+ ^2.0.0 - supports material-ui >= 1.x || 3.x
17+
+ ^2.0.0 - supports material-ui >= 1.x || 3.x || 4.x
1818

1919
Implementation of [react-form-validator-core](https://www.npmjs.com/package/react-form-validator-core) for [material-ui](https://material-ui.com/)
2020

@@ -111,6 +111,11 @@ class ResetPasswordForm extends React.Component {
111111
});
112112
}
113113

114+
componentWillUnmount() {
115+
// remove rule when it is not needed
116+
ValidatorForm.removeValidationRule('isPasswordMatch');
117+
}
118+
114119
handleChange = (event) => {
115120
const { user } = this.state;
116121
user[event.target.name] = event.target.value;

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-material-ui-form-validator",
3-
"version": "2.0.8",
3+
"version": "2.0.9",
44
"description": "Simple validator for forms designed with material-ui v1/v3 components.",
55
"main": "./lib/index.js",
66
"scripts": {
@@ -24,10 +24,10 @@
2424
},
2525
"homepage": "https://github.com/NewOldMax/react-material-ui-form-validator#readme",
2626
"dependencies": {
27-
"react-form-validator-core": "0.6.3"
27+
"react-form-validator-core": "0.6.4"
2828
},
2929
"peerDependencies": {
30-
"@material-ui/core": "^1.0.0 || ^3.0.0",
30+
"@material-ui/core": "^1.0.0 || ^3.0.0 || ^4.0.0",
3131
"react": "^15.0.0 || ^16.0.0",
3232
"react-dom": "^15.0.0 || ^16.0.0",
3333
"prop-types": "^15.0.0"

0 commit comments

Comments
 (0)