It is believed most likely, in scholarship I've read, that the holiday combines both those things. Valentine's execution was the 14th, the day before the festival of Lupercalia, which was observed on the 15th. Even to non-believers, Valentine honoring people's need for love by disobeying an unjust law from an emperor who would rather drive men to war, would have loomed large in their minds during that first lupercalia and proceeding ones. It's only natural that, as Christianity replaced the old Roman pantheon, that lupercalia would become superceded by Saint Valentine's feast day.