mirror of
https://github.com/wassname/wtforms-parsleyjs.git
synced 2026-06-27 16:18:03 +08:00
Fixed checking is in array incorrectly
This commit is contained in:
@@ -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.')
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user