
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
vue-password-checker
Advanced tools
A configurable password strength checker for Vue js
Vue password checker can be installed with both npm and yarn as usual.
npm install vue-password-checker
yarn add vue-password-checker
And then can be imported into your project.
import 'PasswordChecker' from "vue-password-checker";
Vue Password checker takes the following props for configuration:
Type: String The variable to be checked.
required
Type: Boolean
Used to define the font the text will use.
default: false
Type: Object Used to define the colors the strength bar and text will use.
default:
{
invalid: '#000',
very_weak: '#FFF',
weak: '#d44137',
good: '#e36e0e',
strong: '#c4c934',
very_strong: '#24ed09',
}
Type: Boolean When true, a list will be shown instructing what counts as strong password.
default: false
Type: Number
The minimum length the password checker should look for.
default: 6
In order to get the strength value for the password the component is tracking, you can use the getStrength() function, a value from 0 to 100 is returned.
<template>
<div>
<password-checker ref="checker" :password="password" show-instructions>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</password-checker>
</div>
</template>
<script>
import PasswordChecker from "vue-password-checker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
},
mounted:{
//Writes the password strength value to console
console.log(this.$refs.checker.getStrength());
}
}
</script>
The password checker has a slot for inputs to sit in so can be used in this way:
<template>
<div>
<password-checker :password="password" show-instructions>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</password-checker>
</div>
</template>
<script>
import PasswordChecker from "vue-password-checker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
}
}
</script>
Or separately
<template>
<div>
<password-checker :password="password" show-instructions></password-checker>
<label for="password">Password</label>
<input id="password" type="password" v-model="password">
</div>
</template>
<script>
import PasswordChecker from "./src/PasswordChecker";
export default {
name: "App",
data(){
return{
password: '',
}
},
components: {
PasswordChecker,
}
}
</script>
FAQs
A password strength checker for Vue js
We found that vue-password-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.