Formaldehyde is an illegal preservative added to milk to increase its shelf life. To detect it, ferric chloride solution and concentrated sulfuric acid are added to the milk sample. The appearance of a violet color at the junction of two layers confirms the presence of formaldehyde. This test is crucial for identifying unsafe milk and preventing its consumption.