From fe249cf48f36d113f44dbf355f10de1ed4035bd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 13 Oct 2017 18:19:00 +0200 Subject: [PATCH] kivi.Validator: Leere Checks ignorieren MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ermöglicht so etwas in templates: L.some_tag(...., "data-validate"=INSTANCE_CONF.get_some_value) ? "required" : "" ) --- js/kivi.Validator.js | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.20.1