You are here

final public function EdgeEntityDeleteForm::validateVerificationCode in Apigee Edge 8

Element validate callback for the verification code form element.

Parameters

array $element: Element to validate.

\Drupal\Core\Form\FormStateInterface $form_state: Form state.

array $complete_form: The complete form.

File

src/Entity/Form/EdgeEntityDeleteForm.php, line 84

Class

EdgeEntityDeleteForm
Default entity delete form implementation for Apigee Edge entities.

Namespace

Drupal\apigee_edge\Entity\Form

Code

public final function validateVerificationCode(array &$element, FormStateInterface $form_state, array &$complete_form) {
  if ($element['#value'] !== $this
    ->verificationCode()) {
    $form_state
      ->setError($element, $this
      ->verificationCodeErrorMessage());
  }
}