Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Phone number Normalization for Jumpseller Checkout
<!--Copy this code at the end of the Checkout Layout-->
// Restrict to only numbers
if(tecla.charCode < 48 || tecla.charCode > 57) { return false;}
//Phone format
$("#order_customer_phone").attr("maxlength", "8").attr("minlength", "8"); // Change the number according to what you need
$("#order_customer_phone").attr("placeholder", ""); // you can add a format example
$("#order_customer_phone").attr("title", "You must enter at least 8 numbers");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment