fix crud popup validation
All checks were successful
deploy / build-and-deploy (push) Successful in 23s

This commit is contained in:
2025-10-15 14:18:13 +02:00
parent 709116536d
commit 157b1c2dfc

View File

@@ -128,13 +128,8 @@
submitEnabled = false;
for (const key of keys) {
for (const k of key) {
if (k.options?.validate) {
if (k.options?.required && !target[k.key]) {
if (k.options?.required && (!target[k.key] || (k.options.validate && !k.options.validate(target[k.key]))))
return;
} else if (k.options?.required || target[k.key]) {
if (!k.options.validate(target[k.key])) return;
}
}
}
}
submitEnabled = true;