Skip to content

Commit

Permalink
Add material-ui v4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
NewOldMax committed Jun 10, 2019
1 parent 74dd4b0 commit f6d724a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
7 changes: 6 additions & 1 deletion Readme.md
Expand Up @@ -14,7 +14,7 @@ npm install react-material-ui-form-validator

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

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

Expand Down Expand Up @@ -111,6 +111,11 @@ class ResetPasswordForm extends React.Component {
});
}

componentWillUnmount() {
// remove rule when it is not needed
ValidatorForm.removeValidationRule('isPasswordMatch');
}

handleChange = (event) => {
const { user } = this.state;
user[event.target.name] = event.target.value;
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "react-material-ui-form-validator",
"version": "2.0.8",
"version": "2.0.9",
"description": "Simple validator for forms designed with material-ui v1/v3 components.",
"main": "./lib/index.js",
"scripts": {
Expand All @@ -24,10 +24,10 @@
},
"homepage": "https://github.com/NewOldMax/react-material-ui-form-validator#readme",
"dependencies": {
"react-form-validator-core": "0.6.3"
"react-form-validator-core": "0.6.4"
},
"peerDependencies": {
"@material-ui/core": "^1.0.0 || ^3.0.0",
"@material-ui/core": "^1.0.0 || ^3.0.0 || ^4.0.0",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0",
"prop-types": "^15.0.0"
Expand Down

0 comments on commit f6d724a

Please sign in to comment.