Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SpoofCheckValidation.php

function SpoofCheckValidation::isValid

@psalm-suppress InvalidArgument

Overrides EmailValidation::isValid

File

vendor/egulias/email-validator/src/Validation/Extra/SpoofCheckValidation.php, line 28

Class

SpoofCheckValidation

Namespace

Egulias\EmailValidator\Validation\Extra

Code

public function isValid(string $email, EmailLexer $emailLexer) : bool {
    $checker = new Spoofchecker();
    $checker->setChecks(Spoofchecker::SINGLE_SCRIPT);
    if ($checker->isSuspicious($email)) {
        $this->error = new SpoofEmail();
    }
    return $this->error === null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal