You can apply chain rule if $v$ is differentiable wrt $x$ and $x$ is differentiable wrt $t$. I think there are no other conditions,as this post MathSE seems to say, http://math.stackexchange.com/questions/688152/necessary-conditions-for-the-chain-rule-of-differentiation-to-be-valid
and this condition is not always available. When $v=0$,make sure $\frac{dv}{dx}$ exist.