Monday 15 July 2013

JQuery unable to validate password complexity -



JQuery unable to validate password complexity -

i'm trying perform validation password complexity , ensure textbox not empty, has at-least 1 letter, 1 number , 1 special character. somehow when entering password satisfying criteria, true case message block not execute. missing here?

$("#textbox1").focusout(function() { var fn = $('#textbox1').val(); if ((fn=="") || (/^[a-za-z]*$/.test(fn) == false) || (/^[0-9]*$/.test(fn) == false) || (/^[!@#$%^&*() ]*$/.test(fn)==false)) { /*execute error messages*/ } else { /*execute true case messages*/ } });

jquery passwords password-protection

No comments:

Post a Comment