UNPKG

838 BTypeScriptView Raw
1import * as validator from 'validator';
2import { ValidationOptions } from '../ValidationOptions';
3export declare const IS_STRONG_PASSWORD = "isStrongPassword";
4/**
5 * Options to be passed to IsStrongPassword decorator.
6 */
7export type IsStrongPasswordOptions = Pick<validator.StrongPasswordOptions, 'minLength' | 'minLowercase' | 'minUppercase' | 'minNumbers' | 'minSymbols'>;
8/**
9 * Checks if the string is a strong password.
10 * If given value is not a string, then it returns false.
11 */
12export declare function isStrongPassword(value: unknown, options?: IsStrongPasswordOptions): boolean;
13/**
14 * Checks if the string is a strong password.
15 * If given value is not a string, then it returns false.
16 */
17export declare function IsStrongPassword(options?: IsStrongPasswordOptions, validationOptions?: ValidationOptions): PropertyDecorator;