# react-material-ui-form-validator
**Repository Path**: mirrors_suryagh/react-material-ui-form-validator
## Basic Information
- **Project Name**: react-material-ui-form-validator
- **Description**: Simple validator for forms designed with material-ui components.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-18
- **Last Updated**: 2026-03-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## Validation component for material-ui forms
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/js/react-material-ui-form-validator)
[](https://travis-ci.org/NewOldMax/react-material-ui-form-validator)
### [Demo](https://newoldmax.github.io/react-material-ui-form-validator/)
### Installation
````
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
Implementation of [react-form-validator-core](https://www.npmjs.com/package/react-form-validator-core) for [material-ui](https://material-ui.com/)
Supported types:
+ Text ([TextValidator](https://github.com/NewOldMax/react-material-ui-form-validator/blob/master/src/TextValidator.jsx))
+ Select ([SelectValidator](https://github.com/NewOldMax/react-material-ui-form-validator/blob/master/src/SelectValidator.jsx))
Some rules can accept extra parameter, example:
````javascript
### Usage
You can pass any props of field components, but note that ``errorText`` prop will be replaced when validation errors occurred.
Your component must [provide a theme](http://www.material-ui.com/#/get-started/usage).
````javascript
import React from 'react';
import Button from '@material-ui/core/Button';
import { ValidatorForm, TextValidator} from 'react-material-ui-form-validator';
class MyForm extends React.Component {
state = {
email: '',
}
handleChange = (event) => {
const email = event.target.value;
this.setState({ email });
}
handleSubmit = () => {
// your submit logic
}
render() {
const { email } = this.state;
return (