This was made using
https://unmanner.github.io/imaskjs/guide.html
You can input a mask of your choosing following specific rules:
where definitions are:
0
a
*
[]
{}
`
And the input will only allow you to type if you follow those rules.