Subject:  unique fields validation fixed

Description:

will show error at the template

code snippet:

 def clean_<field>(self):
        """                                                                                                                                                  Clean and validate <field> from `models.UserProfile`
        class
        """
        print self.cleaned_data['<field>']
        try:
            UserProfile.objects.get(phone_num=self.cleaned_data['<field>'])
        except UserProfile.DoesNotExist:
            return self.cleaned_data["<field>"]
        raise forms.ValidationError(("FIELD VALUE already exist"))