def METHOD_NAME(self, *args, **kwargs) -> bool:
    """Validate form."""
    result = super().METHOD_NAME(*args, **kwargs)
    with db.session.no_autoflush:
        accountemail = AccountEmail.get(email=self.email.data)
        if accountemail is not None:
            self.user = accountemail.account
        else:
            self.user = None
    return result