From a67f736db247455324215eb412809c6cf49db5a0 Mon Sep 17 00:00:00 2001 From: Mateus Picoloto Date: Thu, 18 Jan 2024 11:18:08 -0300 Subject: [PATCH] fix: prevent non unsigned integer value in cvv input --- view/frontend/web/template/payment/creditcard-form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/frontend/web/template/payment/creditcard-form.html b/view/frontend/web/template/payment/creditcard-form.html index 346a9df0..e71d49b3 100644 --- a/view/frontend/web/template/payment/creditcard-form.html +++ b/view/frontend/web/template/payment/creditcard-form.html @@ -121,7 +121,7 @@ class="input-text cvv cc_cid" name="payment[cc_cid]" value="" - onKeyPress="if(this.value.length==4) return false;" + oninput="this.value = this.value.replace(/[^0-9]/g, ''); if (this.value.length > 4) this.value = this.value.slice(0, 4);" min="0" />