Headless hook
Use usePasswordValidation() for complete control over the UI. No component rendered.
Strength: Very weak (0/4, 0.0 bits)
Valid: No
At least 8 characters
At least one uppercase letter
At least one lowercase letter
At least one number
At least one special character
Snippet
Copy the example to your clipboard.
const { isValid, rules, strength } = usePasswordValidation({
value: password,
rules: ["minLength", "capital", "lowercase", "number", "specialChar"],
minLength: 8,
});
// Build your own UI...