I can do this, but it's easy to see how the rule can fail, for example, what if they use spaces or dots - jeesh!
The best world is one where the user can clearly see what is happening and easily gets used to the rhythm of data entry. Basically, the field needs to provide an input mask and insert any standard characters that exist in the data type.
I see this on web forms all the time. This is what my users are demanding. If there is someone who can help me, I'm happy to pay the fee.