Apple has updated its Knowledge Base article titled "How to verify iPhone hardware is working correctly" with information about liquid damage.
The iPhone has an indicator at the base of its headphone jack that is normally white. If the iPhone has been submerged in liquid or had liquid damage. Apple says that if half of the dot becomes red (or a pinkish color) when the iPhone has been submerged in liquid (see the Apple document for an image). "If the dot is red (or a pinkish color), the repair is not covered by the warranty."
If your iPhone does suffer liquid damage, see our article "What to do if your iPhone gets wet." It contains some procedures that might salvage functionality, which you should try before seeking costy repair or replacement.