Added code to shake textField if text is invalid.