code: protected boolean isPasswordValid() {
  
          if ((m_pw.getPassword1() == null) | (m_pw.getPassword2() == null)) {
              return false;
          }
          try {
              CmsPasswordInfo pwdInfo = new CmsPasswordInfo();
              pwdInfo.setNewPwd(m_pw.getPassword1());
              pwdInfo.setConfirmation(m_pw.getPassword2());
  
              pwdInfo.validate();
              return true;
          } catch (CmsIllegalArgumentException | CmsIllegalStateException e) {
              LOG.error("New password is not ok", e);
              return false;
          }
      }
docs: Validates the password fields.<p>
  
  @return true if password is valid (and confirm field matches password field).<p>