solid-hook-form 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +0,0 @@
1
- import { Message } from './errors';
2
- import { FormValues } from './form';
3
- import { FieldPath, FieldPathValue } from './path';
4
- export type ValidateResult = Message | boolean | undefined;
5
- export type Validate<V, F> = (value: V, formValues: F) => ValidateResult | Promise<ValidateResult>;
6
- export type ValidationValue = boolean | number | string | RegExp;
7
- export type ValidationRule<V extends ValidationValue = ValidationValue> = V | ValidationValueMessage<V>;
8
- export type ValidationValueMessage<V extends ValidationValue = ValidationValue> = {
9
- value: V;
10
- message: Message;
11
- };
12
- export type Rules<F extends FormValues = FormValues, N extends FieldPath<F> = FieldPath<F>> = {
13
- required?: Message | ValidationRule<boolean>;
14
- min?: ValidationRule<number | string>;
15
- max?: ValidationRule<number | string>;
16
- maxLength?: ValidationRule<number>;
17
- minLength?: ValidationRule<number>;
18
- pattern?: ValidationRule<RegExp>;
19
- valueAsNumber?: boolean;
20
- validate?: Validate<FieldPathValue<F, N>, F>;
21
- };
@@ -1,9 +0,0 @@
1
- import { Resolver } from 'react-hook-form';
2
- import { FormValues, UseFormReturn } from './types/form';
3
- type UseFormArg<F extends FormValues> = {
4
- defaultValues: F;
5
- mode?: "onChange" | "onSubmit";
6
- resolver?: Resolver<F>;
7
- };
8
- export declare const useForm: <F extends FormValues>(arg?: UseFormArg<F>) => UseFormReturn<F>;
9
- export {};
@@ -1,2 +0,0 @@
1
- import { FormValues, UseFormReturn } from './types/form';
2
- export declare const useFormContext: <T extends FormValues>() => UseFormReturn<T>;
@@ -1 +0,0 @@
1
- export { get } from 'react-hook-form';
@@ -1,5 +0,0 @@
1
- import { Field } from 'react-hook-form';
2
- import { FormFields } from '../types/form';
3
- type ResolverFields = Record<string, Field["_f"]>;
4
- export declare const getResolverFields: (fields: FormFields) => ResolverFields;
5
- export {};
@@ -1 +0,0 @@
1
- export { set } from 'react-hook-form';