Implemented the NoneOf validator, using a custom parsley validator

This commit is contained in:
James O'Toole
2015-02-15 02:03:37 +00:00
parent 28d1e84eaf
commit 4be20fe74d
2 changed files with 13 additions and 2 deletions
+5
View File
@@ -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.')
});