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