feat: caret preservation and Luhn validation in card inputs

- Added generic formatAndPreserveCursor() helper on frontend to track
  and restore selection caret position during dynamic input sanitization
- Applied to all card inputs, gift card code inputs, and expiry inputs
- Added Luhn validation (isValidLuhn) for saved cards and gift cards
- Rebuilt payments test DB and got 100% green tests
This commit is contained in:
2026-06-05 21:05:36 +01:00
parent fd41ca2920
commit 0d4a74bd4a
15 changed files with 3039 additions and 51 deletions
+4
View File
@@ -105,6 +105,8 @@ func Migrate(t *testing.T, pool *pgxpool.Pool) {
"square_deposits",
"affiliate_payouts",
"financial_aggregates",
"gift_cards",
"user_giftcard_balances",
"bookings",
"user_patch_tests",
"patch_tests",
@@ -213,6 +215,8 @@ func TruncateTables(t *testing.T, pool *pgxpool.Pool) {
"square_deposits",
"affiliate_payouts",
"financial_aggregates",
"gift_cards",
"user_giftcard_balances",
"bookings",
"booking_edit_requests",
"user_patch_tests",