def is_valid(self, bundle, request=None):
    if not bundle.data:
        return {'__all__':
            'Missing data, please include CompanyName, CompanyId, Contact, Email, and Phone.'
            }
errors = {}
company_id = bundle.data.get('CompanyId', None)
if Company.objects.company_exists(company_id):
    errors['CompanyId'
        ] = 'Duplicate CompanyId, CompanyId %s already exists.' % company_id
return errors
How do I configure Tastypie to treat a field as unique?