vue-the-mask
vue-the-mask copied to clipboard
Number or regex pattern
Is there a way to input only numbers or something like that?
and 'F' is a mask where allows only numbers, (multiple numbers) ??
hexTokens: {
F: {
pattern: /[0-9]+/,
}
}
'#': {pattern: /\d/}, is a default token for only numbers input. If you are using :tokens then you have to set your own tokens like you already did.
I think he meant "any amount of numbers". Stumbled across this just now.
I have an input where I need to only allow numbers (undefined number of digits). Right now you need to know the exact amount of digits of your allowed number.
@Jujeu I don't think that there is an actual (regex-)pattern support in this library.
@bernhardberger could you find a solution