diff --git a/contest/validators.py b/contest/validators.py index 709c2aa..22b5f95 100644 --- a/contest/validators.py +++ b/contest/validators.py @@ -9,7 +9,7 @@ import re @deconstructible class CallUsernameValidator(validators.RegexValidator): #regex = r'^[\w.@+-]+$' - regex = r'^(?:[A-Z]+/)?[A-Z]{1,2}[0-9][A-Z]{1,4}(?:/[A-Z])?$' + regex = r'^(?:[A-Z]+/)?[A-Z]{1,2}[0-9][A-Z]{1,4}(?:-[0-9])?(?:/p)?$' message = _( 'Enter a valid Callsign as Username, ALL UPPERCASE, if needed with /A /B,' 'e.g. DL7BST, DN1BER/A, DL/OE1FOO'