mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
319 B
TypeScript
18 lines
319 B
TypeScript
/* eslint-disable id-blacklist */
|
|
import { string, object, ref } from 'yup';
|
|
import type { ObjectShape } from 'yup/lib/object';
|
|
|
|
/**
|
|
* 创建FastForm的Schema
|
|
*
|
|
*
|
|
*/
|
|
export function createFastFormSchema(fieldMap: ObjectShape) {
|
|
return object().shape(fieldMap);
|
|
}
|
|
|
|
export const fieldSchema = {
|
|
string,
|
|
ref,
|
|
};
|