From 4579fee51a2673042149a4a9458ad779f71274b2 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 10 Feb 2022 01:27:12 +0100 Subject: [PATCH] [editor] [#19] Validate durations when checking for invalid rules fixes #19 Signed-off-by: Knut Ahlers --- src/rules.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rules.vue b/src/rules.vue index 202bcf3..9d53d31 100644 --- a/src/rules.vue +++ b/src/rules.vue @@ -1019,6 +1019,11 @@ export default { this.validateReason = `${action.type} -> ${field.key} -> opt` return false } + + if (field.type === 'duration' && !this.validateDuration(action.attributes[field.key], field.optional)) { + this.validateReason = `${action.type} -> ${field.key} -> duration` + return false + } } }