[Password Strength Verification] is implemented and integrated into the plug-in.
It's the same as registering a 126 email address!
Demo link:
Http://www.yhuan.com/formValidator4.1.1/demo8.html
Http://www.yhuan.com
New Functions of the plug-in:
1. Add the input box to set the default value, the formvalidator function adds two attributes: onshowtext (string, null by default) and onshowtextcolor (string array, default: ["#999999", "#000000. For details, see the "your description" Control in demo8
the default font is gray, the entered text is black after the focus is obtained.
example:
$ (" # ms "). formvalidator ({onshowfixtext: "", onshowtext: "This guy is very lazy and has nothing left. ", Ajax: True, onshow:" Enter your description ", onfocus:" The description must contain at least 10 Chinese or 20 characters. ", oncorrect:" congratulations, you are right. "defaultvalue:" This guy is very lazy and has not left anything. "}). Inputvalidator ({min: 20, onerror:" The length of the description you entered is incorrect. Please confirm "});
2. Add the mode attribute for initconfig and set the unified display mode. Remove the tidymode attribute.
Currently, four modes are supported: fixtip, autotip, singletip, and alerttip.
3. Enhance the Display Effect of the fixed prompt layer and add the prompt layer that is always displayed.
Add the onshowfixtext attribute to the formvalidator function (fixed prompt content), and add the variable onmouseoutfixtexthtml to the skin directory JS (when the mouse is outside the control, fixed the HTML of the prompt contentCode), Onmouseinfixtexthtml (when the mouse is in the control, the HTML code of the prompt content is fixed): The fixed display mode of the onshow status prompt content is added. For details, see demo8.
Similar:Http://reg.email.163.com/mailregAll/reg0.jsp? From = 126 mail
Example:
$ ("# Email"). formvalidator ({onshowfixtext: "6 ~ 18 characters, including letters, numbers, and underscores (_). It must start with a letter and end with a letter or number. ", onshow:" Enter your email address "....});
4. provide verification functionsPasswordvalidatorFunction. The parameters are as follows:
1. Whether consecutive characters are allowed
2. Can all characters be the same?
3. Whether it is the same as the specified control ID (for example, user name)
126 mail registration address: http://reg.email.163.com/mailregAll/reg0.jsp? From = 126 mail
Text to be displayed after the verification is successful
VaR passwordstrengthtext = ['password strength: weak ', 'password strength: Medium', 'password strength: strong ']
Password strength verification rules
1. Level: indicates the level of verification, from weak to strong, starting from 1
2. Flag: A combination of 1 (number) + 2 (lower case) + 4 (upper case) + 8 (special characters)
3. Value: 0 indicates the same length as the password, and 1 indicates at least 1 length.
VaR passwordstrengthrule = [
{Level: 1, Rule :[
{Flag: 1, value: [0]}, // number
{Flag: 2, value: [0]}, // lowercase character
{Flag: 4, value: [0]} // uppercase character
]
},
{Level: 2, rule :[
{Flag: 8, value: [0]}, // character
{Flag: 9, value: [1, 1]}, // number (> = 1) + character> = 1)
{Flag: 10, value: [1, 1]}, // lower case (> = 1) + character> = 1)
{Flag: 12, value: []}, // upper case (> = 1) + character> = 1)
{Flag: 3, value: [1, 1]}, // number (> = 1) + lower case (> = 1)
{Flag: 5, value: [1, 1]}, // number (> = 1) + upper case (> = 1)
{Flag: 6, value: [1, 1]} // lower case (> = 1) + upper case (> = 1)
]
},
{Level: 3, Rule :[
{Flag: 11, value: [, 1]}, // number (> = 1) + lower case (> = 1) + special character (> = 1)
{Flag: 13, value: [, 1]}, // number (> = 1) + upper case (> = 1) + special character (> = 1)
{Flag: 14, value: [, 1]}, // lower case (> = 1) + upper case (> = 1) + special character (> = 1)
{Flag: 7, value: [1, 1]} // number (> = 1) + lower case (> = 1) + upper case (> = 1)
]
}
];