How to make this Custom Validation Rule in JQuery?

Hi there

this is my jsfiddle.net
http://jsfiddle.net/vngx/spj2v9rj/2/

What I want when user has selected value on select “userCourse” is “Select Course”

then validation should not go in next parts.
if user has select a value other than Select Course then the validation should be Okay.

How do I acheive this?

Thanks

Change this:

<option value="Select Course">Select Course</option>

to this:

<option value="">Select Course</option>

then add this to your validation rules:

'userCourse': {
  required: true
 }

I have updated mu jsfiddle.net
http://jsfiddle.net/vngx/spj2v9rj/3/

but its not working yet

Check the console.
You have a syntax error.

As an aside, checking the console should be the first thing you do when something JavaScript related doesn’t work as expected.
I wrote a short tutorial on how to do this, that might be useful for you.
Please read it.

@Pullo
After Making Some Changes now its working

Thanks for your tutioral Link

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.