How to validate and restrict unwanted character for zipcode or pincode field using jquery

$(document).ready(function () {
$(‘#pincode’).keyup(function () {
var $th = $(this);
$th.val($th.val().replace(/[^0-9]/g, function (str) {
return ”;
}));
});
});

By admin

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.