下面是我检查UNC格式的代码,我做错了什么?
function CheckforReportPath() {
var path = $('#PathOfReportStoring').val()
if (path == null || path == undefined || path == "") {
return 'The path is not valid. The path must conform to Uniform Naming Convention (UNC) format.'
}
if (/^(\\\\[^/\\\]\[":;|<>+=,?* _]+\\[^/\\\]\[":;|<>+=,?*]+)((?:\\[^\\/:*?"<>|]+)*\\?)$/i.test(path)) {
alert('hi')
return 'The path is not valid. The path must conform to Uniform Naming Convention (UNC) format.'
}
}