def METHOD_NAME(self):
    if User.objects.filter(username=self.cleaned_data['username']).exists():
        raise forms.ValidationError('Sorry, the username is taken.')
    return self.cleaned_data['username']