mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-08 20:23:34 +02:00
added comment
This commit is contained in:
parent
9785bed065
commit
d109f5a265
1 changed files with 6 additions and 0 deletions
|
@ -233,6 +233,12 @@ class DomainDsdataForm(forms.Form):
|
|||
"""Form for adding or editing DNSSEC DS Data to a domain."""
|
||||
|
||||
def validate_hexadecimal(value):
|
||||
"""
|
||||
Tests that string matches all hexadecimal values.
|
||||
|
||||
Raise validation error to display error in form
|
||||
if invalid caracters entered
|
||||
"""
|
||||
if not re.match(r"^[0-9a-fA-F]+$", value):
|
||||
raise forms.ValidationError(str(DsDataError(code=DsDataErrorCodes.INVALID_DIGEST_CHARS)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue