/** * Validates the password. It does this by checking to make sure the password isn't null or an * empty string, and then calls a method on PasswordValidator to do the validation. * * @see jamm.webapp.PasswordValidator#validatePassword * @param mapping The action mapping. * @param request The servlet request. * @return Any errors. */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((mName == null) || mName.equals("")) { errors.add("name", new ActionError("add_account.error.no_name")); } if (!PasswordValidator.validatePassword(mPassword, mRetypedPassword, errors)) { clearPasswords(); } return errors; }