# @types/react-material-ui-form-validator

> TypeScript definitions for react-material-ui-form-validator

Latest version **2.1.5** (published 2024-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-material-ui-form-validator
pnpm add @types/react-material-ui-form-validator
yarn add @types/react-material-ui-form-validator
bun add @types/react-material-ui-form-validator
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.5 |
| Published | 2024-12-05 |
| First published | 2019-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-material-ui-form-validator
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-material-ui-form-validator
- npm.io page: https://npm.io/package/@types/react-material-ui-form-validator

## Dependencies (2)

- [@types/react](https://npm.io/package/@types/react.md) ^18
- [@types/material-ui](https://npm.io/package/@types/material-ui.md) *

## Recent versions

- 2.1.5 (latest) — 2024-12-05
- 2.1.4 (ts4.5) — 2023-11-07
- 2.1.1 (ts3.6) — 2021-07-08
- 2.1.0 (ts3.5) — 2020-08-25
- 2.0.5 (ts3.1) — 2019-11-01
- 2.1.3 — 2023-10-18
- 2.1.2 — 2023-09-27
- 2.0.6 — 2020-08-16
- 2.0.4 — 2019-10-03
- 2.0.3 — 2019-08-19
- 2.0.2 — 2019-07-10
- 2.0.1 — 2019-06-03
- 2.0.0 — 2019-02-14

## README

# Installation
> `npm install --save @types/react-material-ui-form-validator`

# Summary
This package contains type definitions for react-material-ui-form-validator (https://github.com/NewOldMax/react-material-ui-form-validator).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-material-ui-form-validator.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-material-ui-form-validator/index.d.ts)
````ts
import { SelectFieldProps, TextFieldProps } from "material-ui";
import * as React from "react";

export interface ValidatorFormProps {
    className?: string | undefined;
    onSubmit: (event: React.FormEvent) => void;
    instantValidate?: boolean | undefined;
    onError?: ((errors: any[]) => void) | undefined;
    debounceTime?: number | undefined;
    [key: string]: any;
}
export class ValidatorForm extends React.Component<ValidatorFormProps> {
    static addValidationRule(name: string, callback: (value: any) => boolean | Promise<boolean>): void;
    static removeValidationRule(name: string): void;
    isFormValid(dryRun: boolean): Promise<boolean>;
    resetValidations(): void;
}

export interface ValidatorComponentProps {
    errorMessages?: any[] | string | undefined;
    validators?: any[] | undefined;
    name: string;
    value: any;
    validatorListener?: ((isValid: boolean) => void) | undefined;
    withRequiredValidator?: boolean | undefined;
    [key: string]: any;
}

export class ValidatorComponent extends React.Component<ValidatorComponentProps> {
    getErrorMessage(): string | boolean;
    isValid(): boolean;
    makeInvalid(): void;
    makeValid(): void;
    validate(value: string, includeRequired?: boolean, dryRun?: boolean): void;
}
export class TextValidator extends React.Component<ValidatorComponentProps & TextFieldProps> {
    getErrorMessage(): string | boolean;
    isValid(): boolean;
    makeInvalid(): void;
    makeValid(): void;
    validate(value: string, includeRequired?: boolean, dryRun?: boolean): void;
}
export class SelectValidator extends React.Component<ValidatorComponentProps & SelectFieldProps> {
    getErrorMessage(): string | boolean;
    isValid(): boolean;
    makeInvalid(): void;
    makeValid(): void;
    validate(value: string, includeRequired?: boolean, dryRun?: boolean): void;
}

````

### Additional Details
 * Last updated: Thu, 05 Dec 2024 19:32:25 GMT
 * Dependencies: [@types/material-ui](https://npmjs.com/package/@types/material-ui), [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Frank Brullo](https://github.com/FrankBrullo), [Ivan Siacho](https://github.com/Ivansiach0), and [J.R](https://github.com/jrguenin).

---
_Source: https://npm.io/package/@types/react-material-ui-form-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
