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
3 changes: 2 additions & 1 deletion ui/src/workflow/nodes/intent-classify-node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
prop="content_list"
:label="$t('views.applicationWorkflow.nodes.intentNode.input.label')"
:rules="{
required: true,
message: $t('views.applicationWorkflow.nodes.textToSpeechNode.content.label'),
trigger: 'change',
required: true,
}"
>
<template #label>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the provided code snippet, there is an issue with duplicate rules defined for the content_list field. Specifically, you have two instances of the same rule:

required: true,

This will cause validation errors because rules should be unique within a component's rules object.

Additionally, the order of these lines might not meet your expected logic. If both fields need to be validated and are required, they should likely share the same validation rule.

Here is improved version of the rule definition:

:rules="{
  content_list: [
    {
      message: $t('views.applicationWorkflow.nodes.textToSpeechNode.content.label'),
      trigger: 'change'
    },
    { required: true }
  ]
}"

Explanation:

  • Combined two identical validations into one array under content_list.
  • Used {} instead of single quotes around the array to avoid syntax errors in Vue templates.

These changes ensure that the form checks the value change on content_list, and if it’s empty (not valid according to $t('views.applicationWorkflow.nodes.textToSpeechNode.content.label')), then also considers it as invalid due to required: true`.

Expand Down
Loading