Commit 28072740 by Carsten Brandt

fixed wrong usage of $.inArray in validators

fixes #448
parent 1bf739dd
......@@ -87,8 +87,8 @@ yii.validation = (function ($) {
if (options.skipOnEmpty && isEmpty(value)) {
return;
}
var valid = !options.not && $.inArray(value, options.range)
|| options.not && !$.inArray(value, options.range);
var valid = !options.not && $.inArray(value, options.range) > -1
|| options.not && $.inArray(value, options.range) == -1;
if (!valid) {
messages.push(options.message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment