feat: default form validation rules applicable to selector components (#4442)
* fix: hover border style same as antd style when validate error * fix: hover border style same as antd style when validate error * feat(@vben-core/form-ui): Default form validation rules applicable to selector components ---------
This commit is contained in:
@@ -58,6 +58,7 @@ export type CustomRenderType = (() => Component | string) | string;
|
||||
|
||||
export type FormSchemaRuleType =
|
||||
| 'required'
|
||||
| 'selectRequired'
|
||||
| null
|
||||
| (Record<never, never> & string)
|
||||
| ZodTypeAny;
|
||||
@@ -323,5 +324,10 @@ export interface VbenFormAdapterOptions<
|
||||
params: any,
|
||||
ctx: Record<string, any>,
|
||||
) => boolean | string;
|
||||
selectRequired?: (
|
||||
value: any,
|
||||
params: any,
|
||||
ctx: Record<string, any>,
|
||||
) => boolean | string;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user