Hi Jari,
What you'll want to do is use validation rule on the text box. There are default patterns, and you can also create your own. You can set a pattern to be compared to an entry, and also give the user an error if they enter data that does not match the pattern.
In this case, you could use the custom pattern: \d\d\d\d\d\d\-\d\d\d\d
The condition would be, if FieldWithValue does not match pattern \d\d\d\d\d\d\-\d\d\d\d
Hope that helps!
Bre