diff --git a/tiny0/forms.py b/tiny0/forms.py index 1a07e98..c546bea 100644 --- a/tiny0/forms.py +++ b/tiny0/forms.py @@ -47,6 +47,11 @@ def validate_token(form, field): if len(field.data) < 6 or len(field.data) > 16: return + # If the token is the same as a pages route + if field.data == "donate" or field.data == "tracker" or field.data == "lookup": + # Raise a ValidationError + raise ValidationError("Token already exists") + # For each character in the token for char in field.data: # If it is not a valid character