Implement shake animation when an invalid number is input.