You are here

public function SalesforceAuthForm::validateForm in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x src/Form/SalesforceAuthForm.php \Drupal\salesforce\Form\SalesforceAuthForm::validateForm()

Form validation handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormBase::validateForm

File

src/Form/SalesforceAuthForm.php, line 121

Class

SalesforceAuthForm
Entity form for salesforce_auth.

Namespace

Drupal\salesforce\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);
  if (!$form_state
    ->isSubmitted()) {
    return;
  }
  if (!empty($form_state
    ->getErrors())) {

    // Don't bother processing plugin validation if we already have errors.
    return;
  }
  $this->entity
    ->getPlugin()
    ->validateConfigurationForm($form, $form_state);
}