You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var mask = IMask(document.getElementById("testid"), {
mask: '$num',
blocks: {
num: {
mask: new RegExp("^[0-9]+$"),
},
}
});
While this one does not:
var mask = IMask(document.getElementById("testid"), {
mask: '$num',
blocks: {
num: {
mask: new RegExp("^[0-9]{3}$"),
},
}
});
I have tested the RegEx in a regex editor, should be a valid match. But I can not enter anything in the input field in the last example, but in the first example I can enter digits only, as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Can someone elaborate why this one works:
While this one does not:
I have tested the RegEx in a regex editor, should be a valid match. But I can not enter anything in the input field in the last example, but in the first example I can enter digits only, as expected.
Beta Was this translation helpful? Give feedback.
All reactions