nope-validator
Version:
Fast and simple JS validator
15 lines (14 loc) • 671 B
TypeScript
import { NopePrimitive } from './NopePrimitive';
import { NopeReference } from './NopeReference';
declare type T = string | number | Date;
export declare class NopeDate extends NopePrimitive<T> {
private message;
protected _type: string;
before(beforeDate: T | NopeReference, message?: string): this;
after(afterDate: T | NopeReference, message?: string): this;
private parseDate;
validate(entry?: any, context?: Record<string | number, unknown>): string | undefined | any;
validateAsync(entry?: any, context?: Record<string | number, unknown>): Promise<string | undefined | any>;
constructor(message?: string);
}
export {};