Here is the leaflet for valproate. It does list male infertility as a possible side effect (scroll to the bottom)

Sodium Valproate 200mg & 500mg Gastro-Resistant Tablets - X-PIL