jQuery-Mask-Plugin icon indicating copy to clipboard operation
jQuery-Mask-Plugin copied to clipboard

Can I remove default patterns?

Open tclimis opened this issue 7 years ago • 0 comments

For backwards compatibility with a previous js library, I need the following masks:

translation: {
			'9': { pattern: /\d/, optional: false },
			'A': { pattern: /[a-zA-Z]/ },
			'X': { pattern: /[a-zA-Z0-9]/ },
			'?': { pattern: /./ }
		}

I put that in the jMaskGlobals config, and it's working fine. The issue is that it seems to add those masks to the existing set. That means, specifically, that the 0, S, and # masks are still defined. Is there a way to undefine those? That is, replace all the existing translations with my set above, rather than just adding these translations?

tclimis avatar Jan 02 '19 22:01 tclimis