Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ onBeforeUnmount(() => {
v-if="formData.strategy === 'variable_to_dict'"
class="small w-25 shrink-0"
:prop="`group_list.${gIndex}.variable_list.${vIndex}.key`"
:rules="{ whitespace: true, required: true, message: t('workflow.variableAggregation.key.requiredMessage'), trigger: 'blur' }"
>
<el-input v-model="item.key" :placeholder="t('workflow.variableAggregation.key.placeholder')" maxlength="256" />
</el-form-item>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review of the diff

This diff removes a per-item validation rule for key from an <el-form-item> inside a nested v-for loop. Everything else in the snippet is unchanged.

Potential issues

  1. Likely behavioral regression (validation removed)
    The removed rule was { whitespace: true, required: true, message: ..., trigger: 'blur' }. Unless this rule was moved to another place (e.g., added dynamically via setRules, a parent-level array of rules, or handled by a custom validator), the key field will no longer be validated at all. This is the most important thing to verify.

  2. Dynamic prop path + rules removed
    The :prop="\group_list.${gIndex}.variable_list.${vIndex}.key`"` is still there, so the form model path is intact — but without rules it's effectively a no-op (unless validation is driven elsewhere).

  3. Loss of whitespace: true
    Even if required is enforced elsewhere, dropping whitespace: true means a key consisting only of spaces could pass. If whitespace-only keys are invalid, this check must be preserved somewhere.

  4. No new source of truth shown in the diff
    If the intent was to centralize/refactor validation logic, the corresponding change is not visible here. Please confirm one of:

    • Rules were added at the <el-form :rules="..."> level (with matching dynamic property names), or
    • A validator function now handles this field, or
    • A formData-level validation runs before submit.
  5. Localized message reference removed
    The t('workflow.variableAggregation.key.requiredMessage') string may now be orphaned (unused i18n key). Consider cleaning it up — or verify it's reused elsewhere in the codebase.

  6. Test coverage
    Confirm that e2e/unit tests cover "empty key" and "whitespace-only key" cases; otherwise this regression may go unnoticed.

Suggestion

If the goal was to remove the inline rule, ensure the same constraints (required + whitespace) are enforced through a single authoritative mechanism, e.g.:

const rules = computed(() => ({
  // ...
}));
// or a custom validator on the el-form

and add a test asserting that an empty/whitespace key blocks submission.

Bottom line: The change is not obviously broken syntactically, but it silently drops required/whitespace validation on variable_list[*].key. Verify that validation is still enforced elsewhere before merging.

Expand Down
Loading