def clean(self, *args, **kwargs):
if not self.user and (not self.from_name or not self.from_email):<EOL><INDENT>raise ValidationError(_('<STR_LIT>'))<EOL><DEDENT>if self.user:<EOL><INDENT>self.from_name = self.user.get_full_name()<EOL>self.from_email = self.user.email<EOL><DEDENT>
custom validation