Question

it's my validation for chosen enabled select:

SellerDropDownList: {
    required: {
        depends: function (element) {
            return $("#SellerDropDownList").val() == "-1";
        }
    }
}

Default value is -1, but it does not work and when I click submit button; It passes validation while chosen selected value is -1.

JSFiddle: http://jsfiddle.net/maysamsh/rLQDK/18/

Was it helpful?

Solution

Reading the documentation, required does not work the way you are trying to use it.

One option I found to work is min:

    SellerDropDownList: {
        min: 0
    },

Demo

Another possible way is to define your own rule ("not equal") described under this question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top