I use such jquery.inputmask.bundle.js library. Tell me why required form doesn't work when submitting a form and +7 (32_) is inserted into placeholder ... and not +7 () ....?
<input type="text" id="phone" name="phone" placeholder="+7 (___) ___-__-__" minlength="6" required> $("input[name='phone']").inputmask("+7 (999) 999 99 99", { alias: 'phonebe', clearMaskOnLostFocus: false, onBeforeMask: function (value, opts) { var processedValue = value.replace(/^0/g, ""); if (processedValue.indexOf("32") > 1 || processedValue.indexOf("32") == -1) { processedValue = "32" + processedValue; } return processedValue; } });