@stacksjs/ts-validation
Version:
A simple TypeScript starter kit using Bun.
12 lines • 509 B
TypeScript
import { BaseValidator } from './base';
import type { TimeValidatorType, ValidationNames } from '../types';
// Export a function to create time validators
export declare function time(): TimeValidator;
export declare class TimeValidator extends BaseValidator<string> implements TimeValidatorType {
name: ValidationNames;
constructor();
min(min: string): this;
max(max: string): this;
length(length: number): this;
custom(fn: (value: string | null | undefined) => boolean, message: string): this;
}