[editor] [#19] Validate durations when checking for invalid rules

fixes #19

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-02-10 01:27:12 +01:00
parent 8b8c7601f1
commit 4579fee51a
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -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
}
}
}