1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Validations to ensure Record.name and Zone.name have no whitespace

This commit is contained in:
Ross McFarland
2023-05-19 09:57:56 -07:00
parent eca3e108e3
commit cfa7abaee5
6 changed files with 39 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ class ValidationError(RecordException):
@classmethod
def build_message(cls, fqdn, reasons):
reasons = '\n - '.join(reasons)
return f'Invalid record {idna_decode(fqdn)}\n - {reasons}'
return f'Invalid record "{idna_decode(fqdn)}"\n - {reasons}'
def __init__(self, fqdn, reasons):
super().__init__(self.build_message(fqdn, reasons))