Real-Time Password Strength Checking for Wrium
说明与用途
Wrium Password Strength 插件提供即时的客户端密码强度检查,阻止常见密码、检测序列和重复字符,并评估字符多样性。它帮助开发者在表单提交前强制使用更强密码。
问题
Signup forms often accept weak passwords like "password123" before server validation, leading to poor security and user frustration.
结果
The plugin adds a lightweight (≈1 KB) directive that checks passwords in real time, blocking common passwords, detecting sequential or repeated characters, and scoring character variety. It improves security by preventing weak passwords from being submitted and enhances user experience with immediate feedback.
工作流
- Install the plugin via npm:
npm install @wrium/password-strength. Register the plugin in the app with desired rules:createApp(...).use(PasswordStrengthPlugin, {minLength:10, minScore:'good'}).mount('#app'). Add thev-password-strengthdirective to a password input and bind it to a ref. On each keystroke, the directive updates the bound ref with{label, valid, reasons}. Use the ref to display the strength label, list hints, or disable the submit button untilvalidis true. Optionally, use the exportedassessPasswordfunction for non‑reactive validation before sending data to the server.
证据
It adds a single directive, v-password-strength, that checks a password on every input and tells you whether it's good enough.
It has zero dependencies and weighs around 1 KB.
The built‑in blocklist is short. It catches the obvious offenders, but it's not a breach‑database lookup.
- 记录日期: 2026-10-02T11:55:47.230Z