oneframe-react
Version:
Oneframe React ## Components, Hooks, Helper Functions & State Management
19 lines (18 loc) • 545 B
TypeScript
import React from 'react';
export interface IValidate {
required: 'required' | 'maxSelect' | 'minSelect' | 'min' | 'max' | 'maxLength' | 'minLength' | 'custom' | 'email' | 'pattern' | 'url' | 'creditcard' | 'number';
message: string;
regex?: RegExp;
validate?: (e: any) => boolean;
value?: string | number;
}
export interface IForm {
onSubmit: () => void;
onRef?: (e: any) => void;
children: React.ReactNode;
}
export interface IState {
errorMessages: object;
values: object;
submitStatus: boolean;
}