UpperCase
UpperCase Aadhar Mask
by Lalji Tadhani
HTML
<input type="text" name="Aadhar" max="16" />
<input type="text" name="pan" max="16" />
JavaScript
$('input[name="Aadhar"]').on('keypress keyup change', function () {
var value = $(this).val();
value = value.replace(/\D/g, "").split(/(?:([\d]{4}))/g).filter(s => s.length > 0).join("-");
$(this).val(value);
});
$('input[name="pan"]').on('keyup change', function (evt) {
$(this).val(function (_, val) {
return val.toUpperCase();
});
});