asp.net unchanging countenance validator (password strength)


i have validation control following expression:



(?=(.*\\d.*){2,})(?=(.*\\w.*){2,})(?=(.*\\w.*){1,}).{8,}


that's evidence during slightest 2 digits, 2 alpha characters, 1 non-alphanumeric 8 impression minimum. unfortunately doesn't seem cross-browser compliant.



this validation works ideally firefox, nonetheless does internet explorer.



a multiple any your answers law in:



var format = "^(?=.{" + minlength + ",})" + 
(minalpha > 0 ? "(?=(.*[a-za-z].*){" + minalpha + ",})" : "") +
(minnum > 0 ? "(?=(.*[0-9].*){" + minnum + ",})" : "") +
(minnonalpha > 0 ? "(?=(.*\\w.*){" + minnonalpha + ",})" : "") + ".*$";

ex: "^(?=.{x,})(?=(.*[a-za-z].*){y,})(?=(.*[0-9].*){z,})(?=(.*\w.*){a,}).*$"


the vicious square carrying (?.{x,}) length first.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members