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

Breadcrumb

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

function PartParser::checkConsecutiveDots

1 call to PartParser::checkConsecutiveDots()
DomainPart::doParseDomainPart in vendor/egulias/email-validator/src/Parser/DomainPart.php

File

vendor/egulias/email-validator/src/Parser/PartParser.php, line 47

Class

PartParser

Namespace

Egulias\EmailValidator\Parser

Code

protected function checkConsecutiveDots() : Result {
    if ($this->lexer->current
        ->isA(EmailLexer::S_DOT) && $this->lexer
        ->isNextToken(EmailLexer::S_DOT)) {
        return new InvalidEmail(new ConsecutiveDot(), $this->lexer->current->value);
    }
    return new ValidEmail();
}
RSS feed
Powered by Drupal