validation using conditional statement
I have the following code:
<select name="selCompletedBy" id="selCompletedBy">
<option value="Dr">Dr</option>
<option value="Nurse">Nurse</option>
<option value="Therapist">Therapist</option>
<option value="Psychologist">Psychologist</option>
<option value="Other">Other</option>
</select>
<input type="text" name="completedOther" id="completedOther" size="45" maxlength="50" validate="required:true" >
Then in the validation :
completedOther: { required: "#selCompletedBy.selectedvalue=='Other'" }
But this causes an error. How do i make the completedOther text field required if the selCompletedBy = 'Other'
Thanks