Spotting it
The reader needs two chords for this one. The first is a major triad or a dominant seventh whose root sits a whole tone above the tonic, with at least one note outside the key; the second is any chord whose root sits a fifth above the tonic. In C major the first chord is D or D7, which carries F sharp where the key has F, and the second is G or G7. The label goes on the first chord and the span covers both.
In the table
In C F D7 G7 C the D7's numeral is II7, with F# named as the note outside the key, and the G7 after it reads V7. A minor ii in the same place, as in C Dm G7 C, is the key's own chord and nothing fires. Neither does a D7 that goes somewhere other than the fifth degree, because the rule needs the chord it leans on.
The line that reads in lydian
Take the F out and the answer changes. C D G C fits C lydian with no note outside at all, since the lydian scale holds F#, and that reading outscores C major. In C lydian the D major chord is part of the key, so the rule, which asks for a note outside it, stays silent. That is why the corpus line for this move puts an F before the D7: F natural rules lydian out, and the line reads in C major, where the D7 is outside the key and flagged.
In any key
Unlike most of the borrowed chords, this rule does not ask for a major tonic chord. In a minor key the major chord a whole tone above the tonic, followed by the chord on the fifth degree, is flagged the same way whenever one of its notes falls outside the key.