На мой взгляд,
lexstile, Вам нужно копать в
эту сторону. Что-то типа:
$('#input_selector').inputmask({
mask: "D/M",
placeholder: "дд.мм",
definitions: {
"M": {
validator: function (chrs, buffer, pos, strict, opts) {
var valExp = new RegExp("0[1-9]|1[0-2]");
return valExp.test(chrs);
},
cardinality: 2,
prevalidator: [
{ validator: "[01]", cardinality: 1 },
{ validator: "0[1-9]", cardinality: 2 },
{ validator: "1[012]", cardinality: 2 },
]
},
"D": {
validator: function (chrs, buffer, pos, strict, opts) {
var valExp2 = new RegExp("0[1-9]|[12][0-9]|3[01]");
return valExp2.test(chrs);
},
cardinality: 2,
prevalidator: [
{ validator: "[0-3]", cardinality: 1 },
{ validator: "0[1-9]", cardinality: 2 },
{ validator: "(1|2)[0-9]", cardinality: 2 },
{ validator: "3[01]", cardinality: 2 },
]
},
}
});