FeelUs,
function password(str) {
var Digit = /[0-9]/.test(str);
var Upper = /[A-Z]/.test(str);
var Lower = /[a-z]/.test(str);
if (Digit && Upper && Lower && str.length > 7) return true;
else return false
};
alert([password("123"),password("ZZZ"),password("1Za"),password("1Za1Za1Za")]);