[jQuery] Exception errors when using validation rules in 1.3.1
Basically i'm having issues with the validation rules not working in
1.3.1 i read that some of the issues with value="" was fixed but i
think it could be back again but i'm not sure. i created some jing
videos so you can see it more clearly the exception i'm getting is
this in firebug
[Exception... "'Syntax error, unrecognized expression:
[@for='license']' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
1.3.1
http://screencast.com/t/8eC3Yfqz
1.2.6 works perfect
http://screencast.com/t/HGieduTD
same code not sure what to say or do can someone help me out?
jquery
var container = $('div.container');
$('#addlicense').validate({
submitHandler: function() {
$.ajax({
type: 'POST',
url: 'process.php?cmd=addlicense',
dataType: 'html',
data: { issuedby: $('#issuedby').val(), license: $
('#license').val(), licensenum: $('#licensenum').val(), issueddate: $
('#issueddate').val(), expiredate: $('#expiredate').val(), licenseid: $
('#licenseid').val(), action: $('#action').val(), noexpire: $("input
[name='noexpire']:checked").val() },
success: function(data){
$('#licenseresult').prepend(data);
},
error: function(){
alert("An error has occurred. Please try again.");
},
complete: function() {
$('#results').fadeIn('slow');
$('#licensenew').colorBlend([{ fromColor: '#F3F3F3', toColor:
'#33CC33', param: 'backgroundColor', cycles: 1 }]);
$("#addlicense").slideUp();
$("#nolicense").hide();
$("#licensectr").show();
}
});
return false;
},
onkeyup:false,
errorContainer: container,
errorLabelContainer: $("ul", container),
wrapper: 'li',
meta: "validate",
rules: {
license: {
required: true
},
licensenum: {
required: true
},
issuedby: {
required: true
},
issueddate: {
required: true
},
expiredate: {
required: {
required: true,
depends: function(element) {
return $("#noexpire:checked")
}
}
}
},
messages: {
license: {
required: "License Name Description is required"
},
licensenum: {
required: "License number ID is required"
},
issuedby: {
required: "Issued by is required"
},
issueddate: {
required: "Date Issued is required"
},
expiredate: {
required: "Expires On is required"
}
}
});