Open mil3stone opened 1 year ago
You need to use the parameter evalMask. For example:
InputMask inputMask = new InputMask("/^\\d+$/", true);
Can you check if it's working? I also updated this ticket https://github.com/vaadin-component-factory/input-mask/issues/3 to add the Regexp case since it's not easy to use.
Yes! By using the parameter evalMask
I can now reproduce the simple example from imask.js.org
I can't find a way to pass a regular expression. Have tried it similar to the default imask.js example from https://imask.js.org/guide.html#masked-base
but unfortunately, one can neither pass this
/^\d+$/
shortcut nor a RegExp object likenew RegExp("^\d+$")
viaInputMaskOption.option
.Am I missing something to pass a regular expression or is this a future task? I mean, this add-on is declared as EXPERIMENTAL / TESTED in the vaadin directory , so the chance of "not implemented yet" is pretty high.