fix crud popup validation
All checks were successful
deploy / build-and-deploy (push) Successful in 23s
All checks were successful
deploy / build-and-deploy (push) Successful in 23s
This commit is contained in:
@@ -128,13 +128,8 @@
|
|||||||
submitEnabled = false;
|
submitEnabled = false;
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
for (const k of key) {
|
for (const k of key) {
|
||||||
if (k.options?.validate) {
|
if (k.options?.required && (!target[k.key] || (k.options.validate && !k.options.validate(target[k.key]))))
|
||||||
if (k.options?.required && !target[k.key]) {
|
return;
|
||||||
return;
|
|
||||||
} else if (k.options?.required || target[k.key]) {
|
|
||||||
if (!k.options.validate(target[k.key])) return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
submitEnabled = true;
|
submitEnabled = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user