I am trying to make the password setting feature for membership setting page in the website that I am practicing to develope.
Here comes the problem even though I found the solution, but it will be nice if I can really understand the code.
<input type="password" id="pwd" name="password" maxlength="12" size="14" placeholder="6~12enlgish and number" required pattern="(?=^[A-Za-z0-9]{6,12}$)((?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]))^.*$"
The part I am not fully understand is below:
pattern="(?=^[A-Za-z0-9]{6,12}$)((?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]))^.*$
What I understand which learned from the HTML section in the Codecademy course ealier:
[A-Za-z0-9]
means A to Z, a to z and 0 to 9
{6,12}
means the passwords needs at least 6 letters and maximal 12 letters~
According to the sample I found online that I am trying to learn, this whole pattern setting is at least one capital letter for the setting~~
I wonder what if I want to set up the password follow the rules like these below:
- two English letters only
- one Capital English letter
- including one ! or other special characters
4.at least 4 numbers
Please to help me! Thanks, ~~~ I am kind of stuck here a while~~~XD really want to understand ~