Some input validation on from-to box.