class DNSViolationValidator (View source)

DNS Violation Validator

This class handles validation of DNS rule violations on a zone level. It checks for violations like multiple CNAME records with the same name, CNAME records that conflict with other record types, etc.

Methods

__construct(RecordRepositoryInterface $recordRepository)

No description

validate(int|string $recordId, int $zoneId, string $type, string $name, string $content)

Validate that the record doesn't create DNS violations

Details

__construct(RecordRepositoryInterface $recordRepository)

No description

Parameters

RecordRepositoryInterface $recordRepository

ValidationResult validate(int|string $recordId, int $zoneId, string $type, string $name, string $content)

Validate that the record doesn't create DNS violations

Parameters

int|string $recordId

Record ID (-1 for new records, string in API backend mode)

int $zoneId

Zone ID

string $type

Record type

string $name

Record name

string $content

Record content

Return Value

ValidationResult

ValidationResult object with validation result