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

Breadcrumb

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

function DomainPart::checkNotAllowedChars

Parameters

Token<int, string> $token:

Return value

Result

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

File

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

Class

DomainPart

Namespace

Egulias\EmailValidator\Parser

Code

private function checkNotAllowedChars(Token $token) : Result {
    $notAllowed = [
        EmailLexer::S_BACKSLASH => true,
        EmailLexer::S_SLASH => true,
    ];
    if (isset($notAllowed[$token->type])) {
        return new InvalidEmail(new CharNotAllowed(), $token->value);
    }
    return new ValidEmail();
}
RSS feed
Powered by Drupal