code: public static CmsMessageContainer validateUserAndPasswordNotEmpty(String username, String password) {
  
          boolean userEmpty = CmsStringUtil.isEmpty(username);
          boolean passwordEmpty = CmsStringUtil.isEmpty(password);
  
          // login was requested
          if (userEmpty && passwordEmpty) {
              return Messages.get().container(Messages.GUI_LOGIN_NO_DATA_0);
          } else if (userEmpty) {
              return Messages.get().container(Messages.GUI_LOGIN_NO_NAME_0);
          } else if (passwordEmpty) {
              return Messages.get().container(Messages.GUI_LOGIN_NO_PASSWORD_0);
          }
          return null;
      }
docs: Checks that the user name and password are not empty, and returns an error message if they are.<p>
  
  @param username the user name
  @param password the password
  
  @return the error message, or null if the user name and password are OK