Hi Gods,
I have a little problem with jquery validation. In IE 6 and maybee in IE 7 i got an error message: Expected identifier....
I minimised my code and it seems, if i cut out the following part, then everything is works fine. Whats the problem?
I dont really understand where is the extra comma, so i decided i paste the hole validate script. Please take a look at my code.
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[a-zőöüóúéáűí ]+$/i.test(value);
}, "... betűket használjon");
$("#test").validate({
rules: {
name: {
required: true,
minlength: 5,
maxlength: 40,
lettersonly: true
},
addr: {
required: true,
minlength: 15,
maxlength: 80
},
phone: {
required: true,
minlength: 8,
maxlength: 20,
number: true
},
email: {
required: true,
minlength: 5,
email: true
},
count: {
required: true,
minlength: 3,
maxlength: 20,
number: true
},
nettoj: {
minlength: 2,
maxlength: 20,
number: true
},
nettoj2: {
minlength: 2,
maxlength: 20,
number: true
},
mini: {
minlength: 2,
maxlength: 20,
number: true
},
mini2: {
minlength: 2,
maxlength: 20,
number: true
},
adosj: {
minlength: 3,
maxlength: 20,
number: true
},
amini: {
minlength: 2,
maxlength: 20,
number: true
},
stil: {
minlength: 2,
maxlength: 20,
number: true
},
tcount: {
minlength: 2,
maxlength: 20,
number: true
},
city: {
minlength: 3,
maxlength: 60,
lettersonly: true
},
},
messages: {
name: {
required: "... !",
minlength: "Minimum 5 ",
maxlength: "Maximum 40 "
},
addr: {
required: "... ",
minlength: "Minimum 15 ",
maxlength: "Maximum 80 "
},
phone: {
required: "... ",
minlength: "Minimum 8 ",
maxlength: "Maximum 20 ",
number: "... "
},
email: {
required: "... e-mail ",
minlength: "Minimum 5 ",
email: "..."
},
count: {
required: "... ",
minlength: "Minimum 3 ",
maxlength: "Maximum 20 ",
number: "... "
},
nettoj: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
nettoj2: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
mini: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
mini2: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
adosj: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
amini: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
stil: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
tcount: {
minlength: "Minimum 2 ",
maxlength: "Maximum 20 ",
number: "... "
},
city: {
minlength: "Minimum 3 ",
maxlength: "Maximum 80 "
},
},
});