Example #1
0
 def clean_userName(self):
     try:
         name = Name(self.cleaned_data["username"])
     except ValueError:
         raise forms.ValidationError("Usário inválido.")
     return name
Example #2
0
 def clean_userName(self):
     try:
         name = Name(self.cleaned_data['userName'])
     except ValueError:
         raise forms.ValidationError(lang.DICT["EXCEPTION_INV_LOG"])
     return name
Example #3
0
 def clean_courName(self):
     try:
         name = Name(self.cleaned_data["courName"])
     except ValueError:
         raise forms.ValidationError("Nome de Disciplina Inválido")
     return professor
Example #4
0
 def clean_courProfessor(self):
     try:
         professor = Name(self.cleaned_data["courProfessor"])
     except ValueError:
         raise forms.ValidationError("Nome de Professor Inválido")
     return professor
Example #5
0
 def clean_newdata(self):
     try:
         name = Name(self.cleaned_data['newdata'])
     except ValueError as exc:
         raise forms.ValidationError(exc)
     return name