Jquery路径UNC格式

时间:2016-04-05 06:38:44

标签: jquery

下面是我检查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.'
    }
}

0 个答案:

没有答案