Prohibiting an act does not always establish that every legal consequence of the act is nonexistent. The distinction between wrong in itself and wrong due to an attached factor, and the effect of prohibition on legal transactions, are therefore essential.
For a transaction undertaken by a prohibited method, whether it is valid, defective, or void requires examination of what the prohibition attaches to, the constituents of the contract, and the applicable juristic framework. Sinfulness alone does not settle every legal effect.
Correction: Write two questions separately: “Was the act permitted?” and “If it occurred, what legal effect follows?” This prevents moral disapproval from being mistaken for a complete account of legal validity.