Properties
cardInputEventState.js
JS
JavaScript
card.addEventListener("cardBrandChanged", async (cardInputEvent) => {
const currentInputEventState = cardInputEvent.currentState;
const previousInputEventState = cardInputEvent.previousState;
const eventMessage = `Valid input? ${currentInputEventState.isCompletelyValid}
Was field empty? ${previousInputEventState.isEmpty}`
alert(eventMessage);
});