Need help with a regex for alphanumeric password, with at least 1 number and character, and the length must be between 8-20 characters.
I have this but doesn\'t seem
This code is for javascript
// *********** ALPHA-Numeric check ***************************
function checkAlphaNumeric(val)
{
var mystring=new String(val)
if(mystring.search(/[0-9]+/)==-1) // Check at-leat one number
{
return false;
}
if(mystring.search(/[A-Z]+/)==-1 && mystring.search(/[a-z]+/)==-1) // Check at-leat one character
{
return false;
}
}