function fCommonCheckPassword(newpasswd, msgflag, userid){ if(userid == null){ userid = getUserId(); } var alpha = /[a-zA-Z]/; var number = /[0-9]/; var special = /[\-_=+\|()*&^%$#@!~`?\]}\[{\;:/.>,< ]/; var repeat = /(\w)\1\1\1/; var strlength = /.{10,17}/; var flag1,flag2,flag3 var lengthflag = false; var repeatflag = false; if(newpasswd.match(alpha) != null){ flag1=true; } if(newpasswd.match(number) != null){ flag2=true; } if(newpasswd.match(special) != null){ flag3=true; } if(newpasswd.match(strlength) != null){ lengthflag=true; } if(newpasswd.match(repeat) != null){ repeatflag=true; } if(!(flag1 && flag2 && flag3) || !lengthflag){ if(msgflag == null || msgflag == true) messageBox("10~17ÀÚ ¿µ¹®, ¼ýÀÚ, Ư¼ö¹®ÀÚ¸¦ ¸ðµÎ »ç¿ëÇϽʽÿÀ.","E999"); return false; } if(repeatflag==true){ if(msgflag == null || msgflag == true) messageBox("ÆÐ½º¿öµå¿¡ °°Àº ¹®ÀÚ/¼ýÀÚ¸¦ 4¹ø ÀÌ»ó »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.","E999"); return false; } if(newpasswd.toUpperCase().indexOf(userid.toUpperCase()) > -1){ if(msgflag == null || msgflag == true) messageBox("ID ¶Ç´Â »ç¹ø°ú µ¿ÀÏÇÑ ¹®ÀÚ´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.","E999"); return false; } return true; } //function fCommonCheckPassword(newpasswd, msgflag, userid){ // if(userid == null){ // userid = getUserId(); // } // // //¿µ¹®, ¼ýÀÚ È¥¿ëÇØ¼­ 10~17ÀÚ À̳» // //var reg_pw = new RegExp(/^(?=.*[a-zA-Z])(?=.*[-_=+\|()\*&^%$#@!~`?\]}\[{\;:/.>,< ])(?=.*[0-9]).{10,17}$/g); // //var reg_pw = new RegExp("//^(?=.*[a-zA-Z])(?=.*[-_=+\|()\*&^%$#@!~`?\]}\[{\;:/.>,< ])(?=.*[0-9]).{10,17}$", "gi"); // //var reg_pw = /^(?=.*[a-zA-Z])(?=.*[-_=+\|()\*&^%$#@!~`?\]}\[{\;:/.>,< ])(?=.*[0-9]).{10,17}$/gi; // var reg_pw = /^(?=.*[a-zA-Z])(?=.*[-_=+\|()\*&^%$#@!~`?\]}\[{\;:/.>,< ])(?=.*[0-9]).{10,17}$/; // // if(!reg_pw.test(newpasswd)) { // alert("1, " + msgflag); // if(msgflag == null || msgflag == true) // messageBox("10~17ÀÚ ¿µ¹®, ¼ýÀÚ, Ư¼ö¹®ÀÚ¸¦ ¸ðµÎ »ç¿ëÇϽʽÿÀ.","E999"); // return false; // } else if(/(\w)\1\1\1/.test(newpasswd)) { // alert("2, " + msgflag); // if(msgflag == null || msgflag == true) // messageBox("ÆÐ½º¿öµå¿¡ °°Àº ¹®ÀÚ/¼ýÀÚ¸¦ 4¹ø ÀÌ»ó »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.","E999"); // return false; // } else if(newpasswd.toUpperCase().indexOf(userid.toUpperCase()) > -1){ // alert("3, " + msgflag); // if(msgflag == null || msgflag == true) // messageBox("ID ¶Ç´Â »ç¹ø°ú µ¿ÀÏÇÑ ¹®ÀÚ´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.","E999"); // return false; // } // alert("4, " + msgflag); // return true; // //}