What kind of tubes are you using? Presta or Schrader?

If Presta, are you tightening or loosening the nut at the top end? If you are leaving it loose, any pressure (including a valve cap) will cause the air to leak. If you don't loosen, you won't be able to add air. Other things to check - the inner core: some stems have these and you just need to tighten this down. Also, are you carefully keeping the pump and the valve straight to each other? You can bend the valve or the little pin in the core if you don't push on/ pull off the pump straight. You can also bend it if you don't hold the valve while using a frame/mini pump.

To have a cap or not to have a cap, that is the question. The only time everyone seems to agree is that you need a cap on tubes that are rolled up in your seat bag. Then the valve is in contact with the tube and could wear a hole. Otherwise, whatever argement you accept. Everyone has reasons for and against.