One solution could be to have validation on the input field?
You could then limit what kind of characters they can enter via a RegEx (Regular expression)
For example: with the following RegEx: ^\d{4}$
You could limit their input to 4 numbers, such as 4902, 2309, 1122,...
You could block "-" that way.
Thing is, you would limit your customers as they are trying to enter the information.