@modular-forms/qwik
Version:
The modular and type-safe form library for Qwik
13 lines (12 loc) • 464 B
TypeScript
import { type QRL } from '@builder.io/qwik';
import type { FieldValue, Maybe } from '../types';
type Value<TFieldValue extends FieldValue> = Maybe<TFieldValue> | number[];
/**
* Creates a validation function that checks the existence of an input.
*
* @param error The error message.
*
* @returns A validation function.
*/
export declare function required<TFieldValue extends FieldValue>(error: string): QRL<(value: Value<TFieldValue>) => string>;
export {};