Commit 77d33269dc2e928285fe8a4e48faf1bf0137c37a

Authored by ailsoncgt
1 parent d55b9a44

Validate cpf #418

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
core/forms.py
... ... @@ -40,8 +40,8 @@ class RegisterUserForm(forms.ModelForm):
40 40 return cpf
41 41 if User.objects.filter(cpf = cpf).exists():
42 42 raise forms.ValidationError(_('There is already a registered User with this CPF'))
43   - # if not self.validate_cpf(cpf):
44   - # raise forms.ValidationError(_('Please enter a valid CPF'))
  43 + if not self.validate_cpf(cpf):
  44 + raise forms.ValidationError(_('Please enter a valid CPF'))
45 45 return cpf
46 46  
47 47 def clean_password(self):
... ...