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

Breadcrumb

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

function DomainComment::endOfLoopValidations

Overrides CommentStrategy::endOfLoopValidations

File

vendor/egulias/email-validator/src/Parser/CommentStrategy/DomainComment.php, line 18

Class

DomainComment

Namespace

Egulias\EmailValidator\Parser\CommentStrategy

Code

public function endOfLoopValidations(EmailLexer $lexer) : Result {
    
    //test for end of string
    if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
        return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->current->value);
    }
    
    //add warning
    
    //Address is valid within the message but cannot be used unmodified for the envelope
    return new ValidEmail();
}
RSS feed
Powered by Drupal