Invalid inputs? Invalid signature or other data?
First of all if any of the above parameter is invalid then the transaction wont be created on first place. The transaction will be discarded.
To create transaction :
1) Valid Vin and Vout that will be determined by algorithm itself
2) Creating raw transction using txid
3)Signning the transcation (which will be needing your pvt key)
4)Sending the transaction to mempool for verification.
If you manage to reach step 4 then your transaction will possibly get confirmed but for sure it will be sent to mempool. Now its over the miner to confirm or not confirm your transaction.
If you want to make your unconformed transaction as conformed:
one can redo the same transcation with little more transaction fee. If miner is to mine your particular transaction and make it confirm than he needs to confirm all of your earlier tranasctions as well.
Now to answer your question about making your unconformed transaction as invlaid you dont need to do anything for that, after some period of time for your transaction in being in mempool, still unconformed, get revert back to your wallet address
If a transaction attempts to spend an output that doesn't exist and later that output does exist, doesn't the transaction become valid? – David Schwartz – 2018-05-23T19:29:13.623
@DavidSchwartz It would seem so wouldn't it but, how would the utxo be referenced in the first transaction if it did not exist? – Willtech – 2018-05-23T21:01:07.073
The most obvious way -- the person making the transaction already saw the block that included the first transaction but you didn't. Also, this question doesn't seem to be bitcoin specific, so would include systems that don't require you to know specifics of the funding source. (Stellar, for example, doesn't.) – David Schwartz – 2018-05-23T21:32:21.567
Thanks for the detailed answer. Though, I believe @pebwindkraft's answer is more correct and answers my question more directly with all rules that can make tx invalid and eventually not include into a block. So I'll mark his answer. – Eli Livshitz – 2018-05-24T16:15:18.720