class DnsCommonValidator (View source)

Common DNS validation functions shared across record types

Methods

__construct(RecordReadBackendInterface $backendProvider)

No description

validatePriority(mixed $prio, string $type)

Validate priority for DNS records

validateNonAliasTarget(string $target)

Check if target is not a CNAME

bool
isValidPriority(mixed $prio)

Check if the priority value is valid

Details

__construct(RecordReadBackendInterface $backendProvider)

No description

Parameters

RecordReadBackendInterface $backendProvider

ValidationResult validatePriority(mixed $prio, string $type)

Validate priority for DNS records

Check if MX or SRV priority is within range

Parameters

mixed $prio Priority
string $type

Record type

Return Value

ValidationResult

ValidationResult with validated priority or error message

ValidationResult validateNonAliasTarget(string $target)

Check if target is not a CNAME

Parameters

string $target

target to check

Return Value

ValidationResult

ValidationResult indicating if target is valid

bool isValidPriority(mixed $prio)

Check if the priority value is valid

Parameters

mixed $prio

The priority value to check

Return Value

bool

True if the priority is valid, false otherwise