rem: configDir = new Packages.java.io.File(configDir); 
context: function validate(userManager, ldap, userId, email, password, confirmPassword, messages, ldapId, configDir) {    	messages = new Packages.java.util.ArrayList();	    userid = new Packages.java.lang.String(email);    email = new Packages.java.lang.String(email);        var existingUser = userManager.getUser(userId);				if (existingUser != null) {		messages.add("This user already exists.");	}				if (!Packages.org.apache.lenya.ac.impl.AbstractItem.isValidId(userId)) {		messages.add("This is not a valid user ID.");	}			    if (email.length() == 0) {        messages.add("Please enter an e-mail address.");    }    	if (ldap) {	    configDir = new Packages.java.io.File(configDir);	    var ldapUser = new Packages.org.apache.lenya.ac.ldap.LDAPUser(configDir);	    if (!ldapUser.existsUser(ldapId)) {	    	messages.add("This LDAP user ID does not exist.");	    }	}		else {    	password = new Packages.java.lang.String(password);	    confirmPassword = new Packages.java.lang.String(confirmPassword);    		if (!password.equals(confirmPassword)) {		   	messages.add("Password and confirmed password are not equal.");		}				    if (password.length() < 6) {    	    messages.add("The password must be at least six characters long.");	    }    	    if (!password.matches(".*\\d.*")) {    	    messages.add("The password must contain at least one number.");	    }    }            return messages;}
meta: 791	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/ea5b176d777b4ee422df32583477859786bbcb20/user-admin.js/clean/src/webapp/lenya/content/admin/users/user-admin.js