@5minds/node-red-dashboard-2-processcube-dynamic-form 2.5.0 → 2.6.0-develop-ca9bb4-mgo59lu4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,8 +184,11 @@
184
184
  </div>
185
185
  </v-card-text>
186
186
  <v-card-actions>
187
+ <a href="modalImage.url" :download="modalImage.name">
188
+ <v-btn color="secondary" text>Herunterladen</v-btn>
189
+ </a>
187
190
  <v-spacer></v-spacer>
188
- <v-btn color="primary" text @click="closeImageModal">Close</v-btn>
191
+ <v-btn color="primary" text @click="closeImageModal">Schließen</v-btn>
189
192
  </v-card-actions>
190
193
  </v-card>
191
194
  </v-dialog>
@@ -216,6 +219,26 @@ function requiredIf({ value }, [targetField, expectedValue], node) {
216
219
 
217
220
  return true;
218
221
  }
222
+ // Optional: Eigenschaftsflags
223
+ requiredIf.blocking = true; // bei Fehlschlag blockiert es das Formular
224
+ requiredIf.skipEmpty = true; // bei leerem Wert überspringen
225
+
226
+ function multipleEmails(node) {
227
+ if (!node.value) {
228
+ return true; // Leerlauben, oder je nach Bedarf „required“ extra setzen
229
+ }
230
+
231
+ // Trenne anhand von Komma oder Semikolon
232
+ const parts = node.value.split(/\s*[,;]\s*/);
233
+
234
+ // regulärer Ausdruck für gültige E-Mail
235
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
236
+
237
+ return parts.every(p => emailRegex.test(p));
238
+ };
239
+ // Optional: Eigenschaftsflags
240
+ multipleEmails.blocking = true; // bei Fehlschlag blockiert es das Formular
241
+ multipleEmails.skipEmpty = true; // bei leerem Wert überspringen
219
242
 
220
243
  function normalizeCustomForm(input, defaultValue = {}) {
221
244
  if (typeof input === "string") {
@@ -288,7 +311,7 @@ export default {
288
311
  theme: 'genesis',
289
312
  locales: { de },
290
313
  locale: 'de',
291
- rules: { requiredIf: requiredIf },
314
+ rules: { requiredIf, multipleEmails },
292
315
  });
293
316
  app.use(plugin, formkitConfig);
294
317
  },