Fixed checking is in array incorrectly

This commit is contained in:
James O'Toole
2015-02-26 01:24:26 +00:00
parent 04c2ef7f88
commit 2eb9929216
+1 -1
View File
@@ -1,5 +1,5 @@
$(document).ready(function() {
window.ParsleyValidator.addValidator('anyof', function (value, array) {
return array.indexOf(value);
return array.indexOf(value) >= 0;
}, 32).addMessage('en', 'anyof', 'The value you have given is not a listed option.')
});