import { type ValidateFunction } from './user-query.js'; export type RegExStringValidationOptions = { regex: string | RegExp; /** * The default error message is "must match regex ${regex}" which isn't terribly user-friendly. * Use `errorMessage` to provide a more friendly error message. */ errorMessage?: string; }; export type MinLengthStringValidationOptions = { minLength: number; }; export type MaxLengthStringValidationOptions = { maxLength: number; }; export type MinMaxLengthStringValidationOptions = MinLengthStringValidationOptions & MaxLengthStringValidationOptions; export type StringValidationOptions = RegExStringValidationOptions | MinLengthStringValidationOptions | MaxLengthStringValidationOptions | MinMaxLengthStringValidationOptions; /** * Builds a function that conforms to `ValidateFunction` that requires a string to match the given * conditions. */ export declare const stringValidateFn: (options: StringValidationOptions) => ValidateFunction; export type NumberValidateOptions = { min?: number; max?: number; }; export declare const numberValidateFn: (options?: NumberValidateOptions) => ValidateFunction; type URLValidateFnOptions = { httpsRequired?: boolean; /** * Setting this to true (along with httpsRequired) will allow http protocol for localhost * and 127.0.0.1. */ allowLocalhostHTTP?: boolean; /** * Required by default. */ required?: boolean; minPort?: number; maxPort?: number; }; export declare const urlValidateFn: (options?: URLValidateFnOptions) => ValidateFunction; export declare const emailValidate: (input: string) => true | string; export declare const urlValidate: ValidateFunction; export declare const httpsURLValidate: ValidateFunction; export declare const localhostOrHTTPSValidate: ValidateFunction; export {}; //# sourceMappingURL=validate-util.d.ts.map