数字、文字、ダッシュ、スラッシュ、その他のグリフが含まれる可能性のある文字列をテストする必要があります。数字、ダッシュ、およびスラッシュのみを許可する必要があります。数回試しましたが、正規表現の構文が間違っています。
基本的:
var str = '03/02/2013'; //03-02-2013 is also acceptable
if(str has letters in it){
console.log('incorrect formatting');
}else{
//string is made up of only numbers, dashes or forward slashes
console.log('okay');
}