From 77d33269dc2e928285fe8a4e48faf1bf0137c37a Mon Sep 17 00:00:00 2001 From: ailsoncgt Date: Mon, 21 Nov 2016 16:06:55 -0300 Subject: [PATCH] Validate cpf #418 --- core/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/forms.py b/core/forms.py index 43b280a..77263e7 100644 --- a/core/forms.py +++ b/core/forms.py @@ -40,8 +40,8 @@ class RegisterUserForm(forms.ModelForm): return cpf if User.objects.filter(cpf = cpf).exists(): raise forms.ValidationError(_('There is already a registered User with this CPF')) - # if not self.validate_cpf(cpf): - # raise forms.ValidationError(_('Please enter a valid CPF')) + if not self.validate_cpf(cpf): + raise forms.ValidationError(_('Please enter a valid CPF')) return cpf def clean_password(self): -- libgit2 0.21.2