You need to limit it in the Inverse kinematics tab of the bone, (not the transformation tab, nor with a constaint).