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