def validate_username(self, value):
        try:
            User.objects.get(username=value)
        except User.DoesNotExist:
            raise ValidationError(_(u"User '%(value)s' does not exist."
                                    % {"value": value}))

        return value
The original and still very useful way to generate a uni-form form/formset::
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/serializers/share_project_serializer.py/ShareProjectSerializer.validate_username--crossover with--dataset/ETHPy150Open pydanny/django-uni-form/uni_form/templatetags/uni_form_filters.py/as_uni_form