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

Breadcrumb

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

function LocalPart::validateTokens

1 call to LocalPart::validateTokens()
LocalPart::parse in vendor/egulias/email-validator/src/Parser/LocalPart.php

File

vendor/egulias/email-validator/src/Parser/LocalPart.php, line 103

Class

LocalPart

Namespace

Egulias\EmailValidator\Parser

Code

protected function validateTokens(bool $hasComments) : Result {
    if (isset(self::INVALID_TOKENS[$this->lexer->current->type])) {
        return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->current->value);
    }
    return new ValidEmail();
}

API Navigation

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