jQuery password strength checker

后端 未结 13 1989
遥遥无期
遥遥无期 2020-12-08 00:25

I\'m quite new to jQuery, and I\'ve written a simple function to check the strength of a password for each keypress.

The idea is that every time a user enters a char

13条回答
  •  自闭症患者
    2020-12-08 01:20

    • The length of the password should be at least 8 characters.
    • The strength increases with the length, a longer password should have more points.
    • Include special characters like #/" and the like. (Or just any other than [a-Z0-9])
    • For really long passwords this method could get slow. Why don't you just test every new character and use a dictionary for which features the password already has.

提交回复
热议问题