UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

11 lines (10 loc) 528 B
/** * Custom hook for password field validation and state management * Follows SRP by encapsulating all password-related state and logic */ export declare const usePasswordValidation: () => { handlePasswordChange: () => void; isPasswordValid: (password: string | undefined) => boolean; shouldShowRequirements: (password: string | undefined, hidePassword?: boolean) => boolean; getPasswordErrors: (password: string | undefined, errors: Record<string, string>, fieldName?: string) => Record<string, string>; };