I have setup globalization on my web page and have this piece of code to validate numbers:
$.validator.methods.number = function (value, element) {
return !isNaN($.global.parseFloat(value));
};
But this now also validates drop down boxes where I bind to an Nullable eg:
@Html.DropDownListFor(m => m.VendorId, Model.VendorList, "")
which now does not validate properly. How can I prevent this validation on the client side?
Add data-val attribute: