How do I "lock" a dynamic bone to only move on a specific axis? 

I have a pair of earrings on my ear that have a dynamic bone on it but when I move it moves forward and back (due to the dyna bone) and makes it float back and forth which is silly, I would only need the earring to move left and right to simulate it shaking left and right as I move