refactoring, invalid card input indicated by highlighting effect