Skip to content

TapCardViewWidget does not notify when input is cleared #9

@imedhat99

Description

@imedhat99

Issue Summary

TapCardViewWidget triggers onValidInput only when card input becomes valid
When the user clears the card input (e.g. using the ❌ clear button), no callback is triggered
This causes the application state to remain marked as valid even though the input is now empty or invalid.

Steps to Reproduce

  • Integrate TapCardViewWidget in a Flutter application
  • Listen to onValidInput to update the card validity state
  • Enter valid card details and confirm onValidInput is triggered
  • Clear the card input using the ❌ (clear) button
  • Observe that no callback is triggered after clearing the input

Expected Behavior

  • The SDK should notify the host application when:
  • Card input becomes invalid
  • Card input is cleared
  • This could be provided via:
  • An onInvalidInput callback
  • An onInputChange callback with validation state
  • Or a validation boolean parameter

Actual Behavior

  • onValidInput is triggered only on successful validation
  • No callback is fired when:
  • Input is cleared
  • Input becomes invalid
  • Application state remains unchanged unless handled manually

Impact

  • Pay / Submit button may remain enabled after clearing the card input
  • Validation state becomes inconsistent with the actual card input
  • Requires workarounds such as focus listeners or manual state resets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions