We help IT Professionals succeed at work.
Get Started

jQuery Error

Robert Granlund
Last Modified: 2015-03-07
I'm getting an error in a validation script.  I'm using validate.js
the error:
SyntaxError: missing : after property id
item_options[association_membership]: {

I believe it is referring to the bracket...
errorElement: 'div',
			rules: {
				item_options[association_membership]: {
					required: true

			messages: {

				item_options[association_membership]: {
					required: "Please Choose A Membership",


<select id="association_membership" name="item_options[association_membership]" >
<option selected="" disabled="" value="">Association Membership</option>
<option value="Yes" >Yes</option>
<option  value="No" >No</option>

Open in new window

The validate js uses the name value when it looks for a field to validate.  Like I mentioned, I think it is referring to the brackets.  Is there a way to write this so the brackets are or ok or can I leave them out somehow?
Watch Question
Top Expert 2015
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE