Union soldiers had pretty reliable mail throughout the war and so the lucky ones likely got Valentines of some sort.

The Rebels, whether married or merely hoping to be (it was rather more common in those days) were lucky if their erratic mail arrived in time with some version of the doggerel “Roses are red…” written in a longer letter.