Created
May 8, 2020 00:37
-
-
Save iamtonysoft/99d51d5f356142addd740c3863acb4bc to your computer and use it in GitHub Desktop.
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
//mobile number | |
let mobileREGEX = /^(09|\+639)\d{9}$/; | |
let result = mobileREGEX.test($('#mobileNumber').val()); | |
if (result === true) { | |
return true; | |
} else { | |
return false; | |
} | |
//password policy | |
let passRegex = data.Rules; | |
let _regEx = new RegExp(passRegex); | |
let result = _regEx.test($('#newPass').val()); | |
if (result === true) { | |
return true; | |
} else { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment