/**
  * We need to override the default validate_settings method for cases when they are disconnecting, switching auth methods or their credentials are not valid.
  * Be sure to call parent::validate_settings() at the end.
  */
 public function validate_settings($fields, $settings)
 {
     if ($this->is_switch() || $this->is_disconnect()) {
         return true;
     }
     if (!$this->get_connection_string() && $this->tried_to_setup()) {
         return false;
     }
     if ($this->get_connection_string() && !$this->test_authentication()) {
         return false;
     }
     return parent::validate_settings($fields, $settings);
 }