Melamine and milk share a connection ever since the 2008 Chinese milk scandal. You are not supposed to find the compound in it and detection methods have been discussed here ranging from the expensive to the cumbersome. There is always a market for new analytical chemistry and a group of Chinese researchers report on a novel idea here featuring a certain peptide and cyanuric acid.
The peptide is known to self-assemble into nanofibers in plain water or milk. Cyanuric acid units attached to the peptide will end up at the outer surface of the fibers. With a sufficient concentration of melamine, melamine cyanurate adducts will cross-link the fibers causing the formation of a hydrogel. Laboratory testing does not ignore theory and gelling can be visibly detected in milk containing 0.5% (w/w) of the peptide and 20 ppm of melamine after 30 minutes.
Well, not entirely new: cyanuric acid involvement is featured in this 2009 report here. The method will also fail if the milk adulteration is caused by melamine cyanurate in the first place.