# double-opt-in/5.6.3/src/Events/Form/FormValidatedEvent.php

Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification, version 5.6.3. 81 lines.

- Page: https://pluginprobe.com/plugins/double-opt-in/5.6.3/code/src/Events/Form/FormValidatedEvent.php
- Raw: https://pluginprobe.com/plugins/double-opt-in/5.6.3/raw/src/Events/Form/FormValidatedEvent.php
- Modified: 2026-07-13T09:16:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/double-opt-in/5.6.3/code/src/Events/Form/FormValidatedEvent.php#L10-L20`.

```php
<?php
/**
 * Form Validated Event
 *
 * @package Forge12\DoubleOptIn\Events\Form
 * @since   4.0.0
 */

namespace Forge12\DoubleOptIn\Events\Form;

use Forge12\DoubleOptIn\EventSystem\Event;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class FormValidatedEvent
 *
 * Dispatched when form validation is complete.
 */
class FormValidatedEvent extends Event {

	private int $formId;
	private string $formType;
	private bool $isValid;
	private array $errors;
	private string $recipientEmail;

	/**
	 * Constructor.
	 *
	 * @param int    $formId         The form ID.
	 * @param string $formType       The form type.
	 * @param bool   $isValid        Whether validation passed.
	 * @param string $recipientEmail The extracted recipient email.
	 * @param array  $errors         Validation errors if any.
	 */
	public function __construct(
		int $formId,
		string $formType,
		bool $isValid,
		string $recipientEmail,
		array $errors = array()
	) {
		parent::__construct();
		$this->formId         = $formId;
		$this->formType       = $formType;
		$this->isValid        = $isValid;
		$this->recipientEmail = $recipientEmail;
		$this->errors         = $errors;
	}

	/**
	 * {@inheritdoc}
	 */
	public static function getWordPressHookName(): string {
		return 'f12_cf7_doubleoptin_form_validated';
	}

	public function getFormId(): int {
		return $this->formId;
	}

	public function getFormType(): string {
		return $this->formType;
	}

	public function isValid(): bool {
		return $this->isValid;
	}

	public function getRecipientEmail(): string {
		return $this->recipientEmail;
	}

	public function getErrors(): array {
		return $this->errors;
	}
}

```
