Reputation: 1
Here I am using validation on form. It works on Chrome, Firefox but gives the problem in IE10. Some of the validations are not working like email, telephone. And this problem is on all the html pages.
$('#contact').validate({
onfocusout: function (element) {
$(element).valid();
},
rules:{
prenume:{
required:true,
},
nume:{
required:true,
},
email:{
required:true,
email:true
},
password_new:{
required:true,
},
telefon:{
required:true,
},
address:{
required:true,
},
password_repeat:{
required:true,
}
},
messages:{
prenume:{
required:'<div style="color:red; padding-left:0px;" >Acest câmp este obligatoriu.</div>',
},
nume:{
required:'',
},
email:{
required:'<div style="color:red; padding-left:0px;">Acest câmp este obligatoriu.</div>',
email:'<div style="color:red; padding-left:0px;">Adresâ de e-mail incorectâ.</div>',
},
password_new:{
required:'<div style="color:red; padding-left:0px;">Acest câmp este obligatoriu.</div>',
},
telefon:{
required:'<div style="color:red; padding-left:0px;">Acest câmp este obligatoriu.</div>',
},
password_repeat:{
required:'',
}
}
});
Upvotes: 0
Views: 52
Reputation: 12117
IE is syntax strict browser, please care about extra comma(,)
password_repeat:{
required: '',
}
To
password_repeat:{
required: ''
}
Upvotes: 1
Reputation: 11506
@Girish solution would solve the problem and for compatibility mode in IE10 to IE8 = it returns an empty string even if ah attribute doesn't exist. So
$(event.target).attr("formnovalidate") !== undefined
is always true and the validation is skipped forked the jQuery validation plugin and fixed it, here is the fix
Upvotes: 0