Skip to content

Instantly share code, notes, and snippets.

@kellywoo
Last active April 23, 2017 18:42
Show Gist options
  • Save kellywoo/b075f1857edf8c59da635827a8776ed2 to your computer and use it in GitHub Desktop.
Save kellywoo/b075f1857edf8c59da635827a8776ed2 to your computer and use it in GitHub Desktop.
vee-validate-password
import Validate , { Validator } from 'vee-validate'
Validator.extend( 'password',{
getMessage: field => `${field} should include lower-case,
numeric digit, special chracter($@$!%*#?&).`,
validate: value => {
return /^.*(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[$@$!%*#?&]).*$/.test(value)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment