They tried and they failed.
In 2017, Pakistan High Court ruled that Valentines Day was un-Islamic and is not to be celebrated in public places or government offices. An individual had petitioned the court with the plea that it was a cultural import from the West and against the teachings of Islam.