if (ObjUserPassWord.value! = objUserPassWordRe.value) {alert ("enter your password and its confirmation do not match"); return false; }
if (ObjUserPassWord.value.length <6) {alert ("The password of letters, numbers, and special characters with a combination of digits Please enter 6-16"); return false; }
if(!ObjUserPassWord.value.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)) {Alert ("The password of letters, numbers, and special characters with a combination of digits Please enter 6-16"); return false; } If (ObjUserID.value.indexOf (ObjUserPassWord)> -1) {alert ("You can not use the username password"); return false; } Var SamePass_0 = 0; / / The same character loft count var SamePass_1 = 0; / / Continuity of (+)-car sound var SamePass_2 = 0; / / Continuity of (-)-car sound
var chr_pass_2; for (var i = 0; i <ObjUserPassWord.value.length; i + +) {chr_pass_0 = ObjUserPassWord.value.charAt (i); chr_pass_1 = ObjUserPassWord.value.charAt (i +1); / / The same character count if (chr_pass_0 loft == chr_pass_1) {SamePass_0 = SamePass_0 + 1} chr_pass_2 = ObjUserPassWord.value.charAt (i +2); / / Continuity loft of (+)-car sound
if (chr_pass_0.charCodeAt (0) - chr_pass_1.charCodeAt (0) == 1 && chr_pass_1.charCodeAt (0) - chr_pass_2.charCodeAt (0) == 1) {SamePass_1 = SamePass_1 + 1} / / continuity (-)-car loft und if (chr_pass_0.charCodeAt (0) - chr_pass_1.charCodeAt (0) == -1 && chr_pass_1.charCodeAt (0) - chr_pass_2.charCodeAt (0) == -1) {SamePass_2 = SamePass_2 + 1}} if (SamePass_0 > 1) {alert ("more than three times the same character can not be used."); return false; } If (SamePass_1> 1 | | SamePass_2> 1) {alert ("continuous string loft (123 or 321, abc, cba, etc.) \ n 3 or more characters can not be used."); return false; } Return true;
'JQuery' Category of the other posts HTML5 Local Storage (0) 2014/03/03 [jQuery] radio Get the value, setting loft (2) 2013/11/27 password (password) validation (letters, numbers, and special characters combination of 6 to 16 digits) [Source] [javascript] Password loft (password) loft validation (letters, numbers, and special characters loft with a combination of 6-16 digits) | author fall in love (0) 2013/11/19 javascript to use the regular expression the letters, numbers, check the password used interchangeably, but (0) 2013/11/19 jquery social security foreign / domestic Validation (0) 2013/11/19 Hangul or English only check whether there is a JavaScript (0) 2013/11 / 19
Category
News (7)
Recent Trackback bouncy loft castles ... bouncy castles .. 07/11 castle. castle 07/08 coollgameschea ... coollgameschea .. 07/07 http://goodgog ... http://goodgog .. 07/07 bouncy castle ... bouncy castle .. 06/28
Daum
Login
No comments:
Post a Comment