Commit 77d33269dc2e928285fe8a4e48faf1bf0137c37a

Authored by ailsoncgt
1 parent d55b9a44

Validate cpf #418

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
@@ -40,8 +40,8 @@ class RegisterUserForm(forms.ModelForm): @@ -40,8 +40,8 @@ class RegisterUserForm(forms.ModelForm):
40 return cpf 40 return cpf
41 if User.objects.filter(cpf = cpf).exists(): 41 if User.objects.filter(cpf = cpf).exists():
42 raise forms.ValidationError(_('There is already a registered User with this CPF')) 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 return cpf 45 return cpf
46 46
47 def clean_password(self): 47 def clean_password(self):