UNPKG

mantine-entity

Version:

A library combining Mantine, TanStack Query, and Mantine React Table for efficient entity management

22 lines (21 loc) 955 B
import { RegisterOptions } from "react-hook-form"; import { ComparisonType, DataItem, ValidationRules } from "./model"; type ValidatorProps = { fail?: string; }; export declare const validator: { email: (value: string, props?: ValidatorProps) => string | true; arrayMax: (value: any[], max: number, props?: ValidatorProps) => string | true; arrayMin: (value: any[], min: number, props?: ValidatorProps) => string | true; }; export declare const generateValidationRules: (rules?: ValidationRules) => RegisterOptions; export declare function processData({ data, valueKey, labelKey, placeholder, joinBy, }: { data: any; valueKey?: string; labelKey?: string | string[]; placeholder: any; joinBy?: string; }): DataItem[]; export declare function compareValues(value1: string, value2: string, comparison?: ComparisonType, caseSensitivity?: boolean): boolean; export declare function getValidValue(data: any): any; export {};