I have been supplied a form by Salesforce.com for which I need to do client side validation. I am using the Jquery validation plug-in.
The form contains a dropdown list which like this:
<select id="00N2000002pPvP" name="00N2000002pPvP" title="Region">
I have been informed by Salesforce that they cannot change it.
My problem is that the token used starts with a numeric, so when I try to add it to my code I get a syntax error because a Javascript variable can't start with a digit.
jQuery(document).ready(function($) {
var validator = $("#enquiryform").validate({
rules: {
last_name: "required",
company: "required",
email: "required email",
country: "required"
00N20000002pPvP: {
selectNone: true
}
},
messages: {
last_name: "Required",
company: "Required",
email: "Required",
country: "Required",
00N20000002pPvP: "Required"
}
});
});
Apart from changing the token used, is there any way around this?