A transaction is valid when it is confirmed by miners, validate by nodes and a first confirmation is most important.
In practice if a transaction is included in a block, it is most definitely valid because of the financial incentive miners have to make absolutely sure they are not creating an invalid block and lose the reward for their work.
But technically a confirmed transaction can be invalid, the only way to know if a transaction is valid is if your node has validated it.