UNPKG

@th3hero/request-validator

Version:

🚀 Lightweight, fast & flexible request validation library for Node.js/Express/Next.js with TypeScript support. Features 20+ validation rules, database integration, file upload validation, and zero external dependencies. Perfect for API validation, form v

23 lines (22 loc) • 774 B
/** * Custom validation utilities to replace Sequelize's validator */ /** * Validates if a string is a valid email address * @param value - The string to validate * @returns boolean - True if valid email, false otherwise */ export declare const isEmail: (value: string) => boolean; /** * Validates if a string is a valid URL * @param value - The string to validate * @returns boolean - True if valid URL, false otherwise */ export declare const isURL: (value: string) => boolean; /** * Validates if a string is a valid date * @param value - The string to validate * @param format - Optional date format (default: YYYY-MM-DD) * @returns boolean - True if valid date, false otherwise */ export declare const isDate: (value: string, format?: string) => boolean;