Conversation
--bug=1062041 --user=张展玮 【应用编排】意图识别的输入下拉框必填提示没有国际化 https://www.tapd.cn/62980211/s/1777709
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| required: true, | ||
| }" | ||
| > | ||
| <template #label> |
There was a problem hiding this comment.
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`.
fix: Intent node i18n --bug=1062041 --user=张展玮 【应用编排】意图识别的输入下拉框必填提示没有国际化 https://www.tapd.cn/62980211/s/1777709