ms-react-reactive-form
Version:
an implementation of the Reactive Form concept in React, supporting Javascript and Typescript
23 lines (22 loc) • 524 B
TypeScript
import Validators from './Validators';
export interface Group {
controls: {
[key: string]: Control;
};
validity: boolean;
submited: boolean;
}
export interface Control {
value: any;
validity: boolean;
errors: {
[key: string]: any;
};
requiredValidations: {
[key: string]: any;
};
type?: string;
removeValidators(validators: Validators[]): void;
setValidators(validators: Validators[]): void;
setValue(value: any): void;
}