From: Sven Schöling Date: Fri, 13 Oct 2017 16:19:00 +0000 (+0200) Subject: kivi.Validator: Leere Checks ignorieren X-Git-Tag: release-3.5.4~688 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fe249cf48f36d113f44dbf355f10de1ed4035bd9;p=kivitendo-erp.git kivi.Validator: Leere Checks ignorieren Ermöglicht so etwas in templates: L.some_tag(...., "data-validate"=INSTANCE_CONF.get_some_value) ? "required" : "" ) --- diff --git a/js/kivi.Validator.js b/js/kivi.Validator.js index b1bc87c76..e48692749 100644 --- a/js/kivi.Validator.js +++ b/js/kivi.Validator.js @@ -34,6 +34,8 @@ namespace("kivi.Validator", function(ns) { for (var test_idx in tests) { var test = tests[test_idx]; + if (!ns.checks[test]) + continue; if (ns.checks[test]) { if (!ns.checks[test]($e))