JQuery Validation Plugin : Using '#' in name attribute of an element.
Hi,
I'm trying to integrate jQuery validation plugin into an BPM tool that auto generates the User Interface. The problem is the tool internally uses '#' in the 'name' attribute of the user-input elements. Hence, when I try to put some validation rules on the elements, it don't work out. It throws me a JavaScript error message : "missing : after property id.".
My simple POC code is as follows :
$("#signupForm").validate({
rules: {
tw#firstname: "required"
},
messages: {
tw#firstname: "Please enter your firstname",
}
});
Is anybody aware of how to resolve this issue?
Can we possibly use the ID of the element to specify the rules?
Thanks in advance.
Deepak