From 2eb992921633db9efc9947e510a25672eb8c6259 Mon Sep 17 00:00:00 2001 From: James O'Toole Date: Thu, 26 Feb 2015 01:24:26 +0000 Subject: [PATCH] Fixed checking is in array incorrectly --- scripts/parsley-anyof.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.') });