Js password regular formula requirements must contain numbers and letters, in addition to spaces can have other special characters, 6-20 digits how to write! Thank you very much!

search for other information can not be found, I can not write it.

Mar.20,2021

check the following password errors, and if there is a matching result, it is considered not to conform to the composition specification of the password;

  1. No number exists;
  2. there are no letters;
  3. there are spaces;
  4. the number of digits is less than 6 digits
  5. more than 20 digits
^(.{0,5}|.{21,})$|^[^\d]*$|^[^a-zA-Z]*$|\s

it is better to teach people to fish than to teach people to fish
http://deerchao.net/tutorials.

/ (? = ^. {6 d) (20} $) (? =. *\ s). * $/


this problem can be found by any search engine.
look for it


now I have thought of the need for two regularities to judge

  1. must contain numbers and letters / (? =. * [\ d])? (? =. * [a-zA-Z]) (? =. * [\ d]) /
  2. spaces are not allowed / ^ (?!. * [\ s]) /

build environment

= update =

it is also possible to reverse upstairs

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bfc1ea-54f29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bfc1ea-54f29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?