I am new to Stackoverflow and I need your help to match payment invoice number. So that user can't input wrong invoice number. It should match the invoice pattern like `612(fixed) 10/20/30/40/50(only one from 5 of them) 001-064(one at a time) 0000(fixed) 01-64(one at a time) 00(fixed) and then 0001-9999(allowed)`

If I show you one invoice number it'll be like this one `612 30 005 0000 55 00 1234` without any space like this `61230005000055001234`

I can't figure it out how could I do this. please help me if you can.