mirror of
https://github.com/wassname/wtforms-parsleyjs.git
synced 2026-06-27 19:50:07 +08:00
Implemented the NoneOf validator, using a custom parsley validator
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
$(document).ready(function() {
|
||||
window.ParsleyValidator.addValidator('noneof', function (value, array) {
|
||||
return array.indexOf(value) === -1;
|
||||
}, 32).addMessage('en', 'noneof', 'You have entered a value which is not allowed.')
|
||||
});
|
||||
Reference in New Issue
Block a user