Password validation Regular expression

前端 未结 2 714
温柔的废话
温柔的废话 2020-12-22 02:13

I have a password validation like the following rules

  1. Should contains at most 15 chars and 8 chars at least
  2. Password should contain 2 numeral charac
相关标签:
2条回答
  • 2020-12-22 02:47

    The best you can do is present your user with an estimate of the strength of their password and let them shoot their own foot if they wish.

    Any scheme to force people to make good passwords is doomed by the ability of people to use post-it notes.

    0 讨论(0)
  • 2020-12-22 03:02
    ^(?=\D*\d\D*\d).{8,15}$
    
    0 讨论(0)
提交回复
热议问题