I'm trying to make a customAlias to use with jQuery Inputmask, but I'm facing the following problem:
My input:
<input id="input-field-nome" data-inputmask="'alias':'customAlias'" type="text" data-rule-required="true" class="form-control required" placeholder="Nome e sobrenome">
Javascript:
Inputmask.extendAliases({
'customAlias': {
autoUnmask: true,
placeholder: "",
mask: "a",
definitions: { "a" : { validator: "[a-zA-Z]+" } }
}
});
//initializing the plugin
$(":input").inputmask({
placeholder: ''
});
I understood that the validator: "[a-zA-Z]+"
line should work as follows: 'any letter one or more times , but the +
quantizer is not working. I can only insert a letter into the field.
I tried the following ways, but none solved:
"validator": "[a-zA-Z\+]",
- I saw something like this on the plugin examples page.
"validator": "[a-zA-Z]\+",
- I thought escaping + would be the solution, but not.