1 //-------------------------------------------------------------------
2 // This program is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU General Public License
4 // as published by the Free Software Foundation; either version 2
5 // of the License, or (at your option) any later version.
6 //Author:- Author:- ViCarePlus Team, Visolve
7 //Email ID:- vicareplus_engg@visolve.com
8 //-------------------------------------------------------------------
12 * Fuction to check that the password contains at least 3 of the following:
13 * - an integer one integer
14 * - a lower case letter
15 * - an upper case letter
16 * - a special character
17 * Also, the password should be at least 8 characters.
19 function passwordvalidate(password_string) {
20 var pwd = password_string;
47 // Removes leading whitespaces
48 function LTrim(value) {
49 var re = /\s*((\S+\s*)*)/;
50 return value.replace(re, "$1");
53 // Removes ending whitespaces
54 function RTrim(value) {
55 var re = /((\s*\S+)*)\s*/;
56 return value.replace(re, "$1");
59 // Removes leading and ending whitespaces
60 function trim(value) {
61 return LTrim(RTrim(value));