mui-rff
Version:
Set of modern wrapper components to facilitate using Material UI with React Final Form
12 lines (11 loc) • 459 B
TypeScript
import { Schema } from 'yup';
/**
* Wraps the execution of a Yup schema to return an object
* where the key is the form field and the value is the error string.
*/
export declare function makeValidate<T>(validator: Schema<T>): (values: T) => Promise<any>;
/**
* Uses the private _exclusive field in the schema to get whether or not
* the field is marked as required or not.
*/
export declare function makeRequired<T>(schema: Schema<T>): any;