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

Breadcrumb

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

function DomainPart::checkInvalidTokensAfterAT

1 call to DomainPart::checkInvalidTokensAfterAT()
DomainPart::performDomainStartChecks in vendor/egulias/email-validator/src/Parser/DomainPart.php

File

vendor/egulias/email-validator/src/Parser/DomainPart.php, line 125

Class

DomainPart

Namespace

Egulias\EmailValidator\Parser

Code

private function checkInvalidTokensAfterAT() : Result {
    if ($this->lexer->current
        ->isA(EmailLexer::S_DOT)) {
        return new InvalidEmail(new DotAtStart(), $this->lexer->current->value);
    }
    if ($this->lexer->current
        ->isA(EmailLexer::S_HYPHEN)) {
        return new InvalidEmail(new DomainHyphened('After AT'), $this->lexer->current->value);
    }
    return new ValidEmail();
}
RSS feed
Powered by Drupal