Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Custom-Validierung für mehre als eine E-Mail mit der Validierung "multipleEmails" - #45

Merged
moellenbeck merged 7 commits into
mainfrom
develop
Oct 12, 2025
Merged

moellenbeck merged 7 commits into
mainfrom
develop

Conversation

@moellenbeck

Copy link
Copy Markdown
Member

No description provided.

@moellenbeck
moellenbeck requested a review from Copilot October 12, 2025 21:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds custom validation for multiple email addresses in a dynamic form component. The implementation includes a new multipleEmails validation rule that allows comma or semicolon-separated email addresses, along with improvements to the existing requiredIf validation function.

  • Added multipleEmails custom validation rule for validating multiple email addresses
  • Refactored and improved the requiredIf validation function with better logic and documentation
  • Added German localization for UI elements (download button and close button)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
ui/components/UIDynamicForm.vue Added multipleEmails validation, improved requiredIf function, and German UI translations
package.json Version bump from 2.5.0 to 2.6.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

const parts = node.value.split(/\s*[,;]\s*/);

// regulärer Ausdruck für gültige E-Mail
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

Copilot AI Oct 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email regex pattern is overly simplistic and may not handle valid email addresses with special characters, quoted strings, or other RFC-compliant formats. Consider using a more comprehensive email validation library or a more robust regex pattern that follows RFC 5322 standards.

Copilot uses AI. Check for mistakes.
// Optional: Eigenschaftsflags
requiredIf.blocking = true; // bei Fehlschlag blockiert es das Formular
requiredIf.skipEmpty = true; // bei leerem Wert überspringen

Copilot AI Oct 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multipleEmails function lacks documentation explaining its purpose, parameters, and expected behavior. Add a JSDoc comment similar to the one provided for requiredIf to improve code maintainability.

Suggested change
/**
* Validates that a field contains a comma- or semicolon-separated list of valid email addresses.
*
* @param {object} node - The FormKit node representing the field to validate. The node's `value` should be a string containing one or more email addresses separated by commas or semicolons.
* @returns {boolean} Returns `true` if all provided email addresses are valid or if the field is empty; otherwise, returns `false`.
*
* Example:
* "user1@example.com, user2@example.com"
* "user1@example.com;user2@example.com"
*/

Copilot uses AI. Check for mistakes.
Comment thread ui/components/UIDynamicForm.vue
Comment thread ui/components/UIDynamicForm.vue
@moellenbeck
moellenbeck merged commit a39d65e into main Oct 12, 2025
2 checks passed
process-engine-ci added a commit that referenced this pull request Oct 12, 2025
# Changelog v2.6.0 (12.10.2025)

Dieser Changelog deckt die Änderungen zwischen folgenden Versionen ab: [v2.5.0 und v2.6.0](v2.5.0...v2.6.0).

Weitere Hinweise befinden sich im Changelog der vorherigen Version: [v2.5.0](https://github.com/5minds/node-red-dashboard-2-processcube-dynamic-form/releases/tag/v2.5.0).

## Merged Pull Requests

- #45 Custom-Validierung für mehre als eine E-Mail mit der Validierung "multipleEmails"  (merged 12.10.2025)

[skip ci]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants