[jQuery] [Validate]

[jQuery] [Validate]


The validate plugin is rocking my world. It will be all over
emedtv.com (my job) pretty soon for our upcoming registration included
projects. I added a couple of methods that help me out!
For instance for drop downs I did this:
jQuery.validator.addMethod("selectDate", function(value, element) {
    return this.optional(element) || ( value.indexOf("none") == -1);
}, "Please enter a date.");
And the JSTL/HTML is:
<select id="birth-month" name="birth-month" class="selectDate" >
<option value="none">Month</option>
<c:forEach
items="January,February,March,April,May,June,July,August,September,October,November,December"
var="months">
<option value="${months}" <c:if test="${values['birth-
month']==months}">selected="true"</c:if> >${months}</option>
</c:forEach>
</select>
<select id="birth-day" name="birth-day" class="selectDate" >
<option value="none">Day</option>
<c:forEach begin="1" end="31" var="days">
<option value="${days}" <c:if test="${values['birth-
day']==days}">selected="true"</c:if>>${days}</option>
</c:forEach>
</select>
<select id="birth-year" name="birth-year" class="research-signup-year
selectDate" >
<option value="none">Year</option>
<c:forEach items="${years}" var="year" >
<option value="${year}" <c:if test="${values['birth-
year']==year}">selected="true"</c:if>>${year}</option>
</c:forEach>
</select>
The CSS is: