What this rule checks
Classical definition: If a graha other than Surya occupies the 2nd house from Chandra, Sunapha Yoga is formed. In modern terms: At least one of Mars, Mercury, Jupiter, Venus or Saturn is in the 2nd house from the Moon, which is the sign right after the Moon's sign. The Sun is not counted. Rahu and Ketu are not counted either. Houses are counted from the Moon's sign: the Moon's own sign is the 1st. Source: Brihat Parashara Hora Shastra, Chapter 37, verses 7-10; Phaladeepika, Adhyaya 6, sloka 5 (V. Subrahmanya Sastri's translation); Jataka Parijata, Adhyaya 7, slokas 72-73 (V. Subrahmanya Sastri's translation).