class NSRecordValidator implements DnsRecordValidatorInterface (View source)

NS Record Validator

Validates NS (Name Server) records according to:

  • RFC 1034: Domain Names - Concepts and Facilities (Sections 3.6 and 4.2.1)
  • RFC 1035: Domain Names - Implementation and Specification (Section 3.3.11)
  • RFC 2181: Clarifications to the DNS Specification (Section 10.3)

NS records delegate a domain or subdomain to a set of name servers. They identify the authoritative DNS servers for a zone. According to RFCs, NS record targets must be hostnames, not IP addresses, and cannot point to a CNAME record.

Methods

__construct(ConfigurationManager $config)

No description

validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validate NS record

Details

__construct(ConfigurationManager $config)

No description

Parameters

ConfigurationManager $config

ValidationResult validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validate NS record

Parameters

string $content

The content part of the record

string $name

The name part of the record

mixed $prio

The priority value (if applicable)

int|string|null $ttl

The TTL value

int $defaultTTL

The default TTL to use if not specified

mixed ...$args

Additional validator-specific parameters

Return Value

ValidationResult

ValidationResult containing validated data or error messages