How to use react-material-ui-form-validator - 10 common examples

To help you get started, we’ve selected a few react-material-ui-form-validator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NewOldMax / react-material-ui-form-validator / src / components / examples / CustomRulesFormExample.js View on Github external
componentDidMount() {
        // custom rule will have name 'isPasswordMatch'
        ValidatorForm.addValidationRule('isPasswordMatch', (value) => {
            const { formData } = this.state;
            if (value !== formData.password) {
                return false;
            }
            return true;
        });
    }
github rjwats / esp8266-react / interface / src / forms / WiFiSettingsForm.js View on Github external
componentWillMount() {
    ValidatorForm.addValidationRule('isIP', isIP);
    ValidatorForm.addValidationRule('isHostname', isHostname);
    ValidatorForm.addValidationRule('isOptionalIP', optional(isIP));
  }
github Colt / react-colors / colors-app / src / PaletteMetaForm.js View on Github external
componentDidMount() {
    ValidatorForm.addValidationRule("isPaletteNameUnique", value =>
      this.props.palettes.every(
        ({ paletteName }) => paletteName.toLowerCase() !== value.toLowerCase()
      )
    );
  }
  handleChange(evt) {
github rjwats / esp8266-react / interface / src / forms / UserForm.js View on Github external
componentWillMount() {
    ValidatorForm.addValidationRule('uniqueUsername', this.props.uniqueUsername);
  }
github rjwats / esp8266-react / interface / src / forms / WiFiSettingsForm.js View on Github external
componentWillMount() {
    ValidatorForm.addValidationRule('isIP', isIP);
    ValidatorForm.addValidationRule('isHostname', isHostname);
    ValidatorForm.addValidationRule('isOptionalIP', optional(isIP));
  }
github Colt / react-colors / colors-app / src / ColorPickerForm.js View on Github external
componentDidMount() {
    ValidatorForm.addValidationRule("isColorNameUnique", value =>
      this.props.colors.every(
        ({ name }) => name.toLowerCase() !== value.toLowerCase()
      )
    );
    ValidatorForm.addValidationRule("isColorUnique", value =>
      this.props.colors.every(({ color }) => color !== this.state.currentColor)
    );
  }
  updateCurrentColor(newColor) {
github rjwats / esp8266-react / interface / src / forms / OTASettingsForm.js View on Github external
componentWillMount() {
    ValidatorForm.addValidationRule('isIPOrHostname', or(isIP, isHostname));
  }
github tamasszoke / mern-boilerplate / client / src / components / Registration / Registration.js View on Github external
componentDidMount() {
    ValidatorForm.addValidationRule('isPasswordMatch', (value) => {
      if (value !== this.state.password) {
        return false
      }
      return true
    })
  }
github tamasszoke / mern-boilerplate / client / src / components / RecoveryHash / RecoveryHash.js View on Github external
componentDidMount() {
    ValidatorForm.addValidationRule('isPasswordMatch', (value) => {
      if (value !== this.state.password) {
        return false
      }
      return true
    })
  }
github rjwats / esp8266-react / interface / src / forms / WiFiSettingsForm.js View on Github external
componentWillMount() {
    ValidatorForm.addValidationRule('isIP', isIP);
    ValidatorForm.addValidationRule('isHostname', isHostname);
    ValidatorForm.addValidationRule('isOptionalIP', optional(isIP));
  }

react-material-ui-form-validator

Simple validator for forms designed with material-ui v1/v3/v4/v5 components.

MIT
Latest version published 1 month ago

Package Health Score

68 / 100
Full package analysis

Popular react-material-ui-form-validator functions