@stacksjs/ts-validation
Version:
A simple TypeScript starter kit using Bun.
15 lines (14 loc) • 517 B
TypeScript
import type { LengthValidator, Validator } from './base';
export declare interface FloatOptions {
locale?: string
min?: number
max?: number
lt?: number
gt?: number
}
export declare interface FloatValidatorType extends Validator<number>, LengthValidator<FloatValidatorType> {
positive: () => FloatValidatorType
negative: () => FloatValidatorType
divisibleBy: (divisor: number) => FloatValidatorType
custom: (fn: (value: number | null | undefined) => boolean, message: string) => FloatValidatorType
}