@classmethod
    def validate_username(cls, username):
        username = username.lower()
        if username in cls._reserved_usernames:
            raise forms.ValidationError(
                username % _(u'%s is a reserved name, please choose another'))
        elif not cls.legal_usernames_re.search(username):
            raise forms.ValidationError(
                _(u'username may only contain alpha-numeric characters and '
                  u'underscores'))
        try:
            User.objects.get(username=username)
        except User.DoesNotExist:
            return username
        raise forms.ValidationError(_(u'%s already exists') % username)
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/main/forms.py/RegistrationFormUserProfile.validate_username/swapped operands of `%`