@@ -9,7 +9,8 @@ import re
 
 PUBLIC = 'public' # This username is blocked by Quilt signup
 VALID_NAME_RE = re.compile(r'^[a-zA-Z]\w*$')
-EMAILREGEX = re.compile(r'^([^\s@]+)@([^\s@]+)$')
+VALID_USERNAME_RE = re.compile(r"^[^\d\W]\w*\Z", re.UNICODE)
+VALID_EMAIL_RE = re.compile(r'^([^\s@]+)@([^\s@]+)$')
 
 class PaymentPlan(Enum):
     FREE = 'free'
# Copyright (c) 2017 Quilt Data, Inc. All rights reserved.

"""
Constants
"""

from enum import Enum
import re

PUBLIC = 'public' # This username is blocked by Quilt signup
VALID_NAME_RE = re.compile(r'^[a-zA-Z]\w*$')
EMAILREGEX = re.compile(r'^([^\s@]+)@([^\s@]+)$')

class PaymentPlan(Enum):
    FREE = 'free'
    INDIVIDUAL = 'individual_monthly_7'
    BUSINESS_ADMIN = 'business_monthly_490'
    BUSINESS_MEMBER = 'business_member'

We should be using `VALID_NAME_RE` for usernames. If we currently allow them to start with `_`, then that's a bug.