UNPKG

core-fed-util

Version:

This is A collection of commonly used frontend utility functions‌

33 lines 1.7 kB
/** * @description Validates a username based on specific criteria. * @param email {string} email - The email address to validate. * @returns {boolean} - Returns true if the email is valid, false otherwise. */ export declare function validEmail(email: string): boolean; /** * @description Validates a password based on specific criteria.: * Validates a password to ensure it contains at least one uppercase letter, one lowercase letter, one digit, and is at least 8 characters long. * @param password {string} password - The password to validate. * @returns {boolean} - Returns true if the password is valid, false otherwise. */ export declare function validPassword(password: string): boolean; /** * @description Validates a id card based on specific criteria. * @param idCard {string} idCard - The ID card number to validate. * @returns {boolean} - Returns true if the ID card number is valid, false otherwise. */ export declare function validIdCard(idCard: string): boolean; /** * @description Validates a URL based on specific criteria. * @param url {string} url - The URL to validate. * @returns {boolean} - Returns true if the URL is valid, false otherwise. */ export declare function validateURL(url: string): boolean; /** * @description Validates a date string against a specific format. * @param date {string} date - The date string to validate. * @param format {string} format - The date format to validate against, e.g., '-' or '/'. * @returns {boolean} - Returns true if the date is valid according to the specified format, false otherwise. */ export declare function validateFormatDate(date: string, format: string): boolean; //# sourceMappingURL=Regexp.d.ts.map