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

Breadcrumb

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

function DomainPart::isLabelTooLong

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

File

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

Class

DomainPart

Namespace

Egulias\EmailValidator\Parser

Code

private function isLabelTooLong(string $label) : bool {
    if (preg_match('/[^\\x00-\\x7F]/', $label)) {
        idn_to_ascii($label, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46, $idnaInfo);
        return (bool) ($idnaInfo['errors'] & IDNA_ERROR_LABEL_TOO_LONG);
    }
    return strlen($label) > self::LABEL_MAX_LENGTH;
}
RSS feed
Powered by Drupal