You have to escape the backslashes inside strings that will be passed to the RegExp
constructor:
regex: "\\d{6}\\-\\d{2}\\-\\d{4}"
I would also recommend adding anchors to it:
regex: "^\\d{6}\\-\\d{2}\\-\\d{4}$"
This way you will consider "1234567-12-12345" as invalid.
Update
Alternatively, you can pass a RegExp object using a literal expression:
regex: /^\d{6}-\d{2}-\d{4}$/