[jQuery] Jquery Validation Plugin: Select box query
Hi
I'm using the fantastic jquery validation plugin (along with the
equally fantastic form plugin) and I have one query regarding the
validation of a select box.
Looking at the demos the 'required="true"' works if you have mark like
so:
<select>
<option></option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<option value="c">Option C</option>
</select>
, but my client wants the following markup:
<select>
<option>--Select an option--</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<option value="c">Option C</option>
</select>
A validation error should fire if the first option is selected as it
doesn't have a value, but I'm struggling to get this to work. Is this
a known issue or am I just implementing the validation javascript
incorrectly?
If it is a known issue, does anyone have a workaround?
Thanks for your time
Sniffer