Commits

George Notaras committed 38802ef

Implemented A record validation.

  • Participants
  • Parent commits 6a48bb6

Comments (0)

Files changed (1)

src/powerdns_manager/forms.py

 class ARecordModelForm(BaseRecordModelForm):
     """ModelForm for A resource records."""
 
+    def clean_name(self):
+        name = self.cleaned_data.get('name')
+        validate_hostname(name, supports_wildcard=True)
+        return name
+    
     def clean_content(self):
         """Ensures that content is an IPv4 address."""
         content = self.cleaned_data.get('content')