Last active
April 23, 2017 18:42
-
-
Save kellywoo/b075f1857edf8c59da635827a8776ed2 to your computer and use it in GitHub Desktop.
vee-validate-password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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