PolymerElements / gold-cc-input

An input element that only allows credit card numbers
https://webcomponents.org/element/PolymerElements/gold-cc-input
13 stars 23 forks source link

Card type icon is still shown after input is cleared #66

Open TomK opened 7 years ago

TomK commented 7 years ago

Description

Card type icon is still shown after input is cleared. This is because the overridden validate method does not clear it when the value is empty and required is false.

Steps to reproduce

  1. Type a valid number (4111 1111 1111 1111)
  2. Visa icon appears
  3. Clear card number in one action (select all + delete)
  4. Card type icon still shows visa