diff --git a/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationEditor.svelte b/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationEditor.svelte
index 6c62c9f5af..6db24e8d69 100644
--- a/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationEditor.svelte
+++ b/packages/builder/src/components/design/settings/controls/ValidationEditor/ValidationEditor.svelte
@@ -8,16 +8,29 @@
export let componentDefinition
export let type
+ const dispatch = createEventDispatcher()
let drawer
- const dispatch = createEventDispatcher()
+ $: text = getText(value)
+
const save = () => {
dispatch("change", value)
drawer.hide()
}
+
+ const getText = rules => {
+ if (!rules?.length) {
+ return "No rules set"
+ } else {
+ return `${rules.length} rule${rules.length === 1 ? "" : "s"} set`
+ }
+ }
-