diff --git a/scripts/parsley-anyof.js b/scripts/parsley-anyof.js index 273744e..5fc738c 100644 --- a/scripts/parsley-anyof.js +++ b/scripts/parsley-anyof.js @@ -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.') });