diff options
Diffstat (limited to 'webmentions_ssg/forms')
| -rw-r--r-- | webmentions_ssg/forms/validators.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webmentions_ssg/forms/validators.py b/webmentions_ssg/forms/validators.py index e65e9cb..a22c942 100644 --- a/webmentions_ssg/forms/validators.py +++ b/webmentions_ssg/forms/validators.py @@ -102,7 +102,14 @@ class AllowedTargetHostname: if hostname in current_app.config["ALLOWED_TARGET_HOSTNAMES"]: return - raise ValidationError(self.message or field.gettext("Invalid input.")) + raise ValidationError( + self.message + or field.gettext( + "Target hostname is not in ALLOWED_TARGET_HOSTNAMES." + if hostname is not None + else "Invalid input." + ) + ) class RejectNonPublicIPLiteral: |
