react-use-password-validator
Version:
React Hooks Password Validator
15 lines (14 loc) • 544 B
TypeScript
declare type ValidatorOptionType = number | boolean;
export interface IValidatorOption {
min: number;
max: number;
digits: ValidatorOptionType;
letters: ValidatorOptionType;
lowercase: ValidatorOptionType;
uppercase: ValidatorOptionType;
symbols: ValidatorOptionType;
spaces: ValidatorOptionType;
}
export declare type IUsePasswordValidator = [boolean, (password: string) => void];
export declare function usePasswordValidator(option?: Partial<IValidatorOption>): IUsePasswordValidator;
export {};