If you're a fan of Regular Expressions, you could do a Regex match on it to reject anything other than
NNNN-NN-NN
where N is in the range [0-9].
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.