Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 所需属性的dataannotations在IE8中不起作用_Asp.net Mvc - Fatal编程技术网

Asp.net mvc 所需属性的dataannotations在IE8中不起作用

Asp.net mvc 所需属性的dataannotations在IE8中不起作用,asp.net-mvc,Asp.net Mvc,我有一个MVC-4项目,jQueryVersion1.9.1和jQueryUI-1.10.2。 我使用了下面的代码 [Required(ErrorMessage = "Required")] public string Name { get; set; } 它在所有其他浏览器中正常工作,然后是IE-8。 你能建议我需要做什么才能让它在IE-8中工作吗 感谢您的帮助。这是关于jquery.validate.js版本的 检查以下建议: 问题出在jquery.validate.js上。获取最新版本

我有一个MVC-4项目,jQueryVersion1.9.1和jQueryUI-1.10.2。 我使用了下面的代码

[Required(ErrorMessage = "Required")]
public string Name { get; set; }
它在所有其他浏览器中正常工作,然后是IE-8。 你能建议我需要做什么才能让它在IE-8中工作吗


感谢您的帮助。

这是关于
jquery.validate.js
版本的

检查以下建议:

问题出在jquery.validate.js上。获取最新版本或更改

return $([]).add(this.currentForm.elements)             
.filter(":input")

工作守则:

//return $([]).add(this.currentForm.elements)             
//.filter(":input")             
return $(':input', this.currentForm)             
.not(":submit, :reset, :image, [disabled]")             
.not( this.settings.ignore )             
.filter(function() {
    !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);                              
    // select only the first element for each name, and only those with rules specified                 
    if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
        return false;                                  
    rulesCache[this.name] = true;                 
    return true;             
});
参考文献:

//return $([]).add(this.currentForm.elements)             
//.filter(":input")             
return $(':input', this.currentForm)             
.not(":submit, :reset, :image, [disabled]")             
.not( this.settings.ignore )             
.filter(function() {
    !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);                              
    // select only the first element for each name, and only those with rules specified                 
    if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
        return false;                                  
    rulesCache[this.name] = true;                 
    return true;             
});