fix: object label not pass the right value

This commit is contained in:
Joel 2024-04-01 17:52:11 +08:00
parent 6fea18b4d0
commit a42f26d857
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ const BeforeRunForm: FC<BeforeRunFormProps> = ({
form.inputs.forEach((input) => {
const value = form.values[input.variable]
if (!errMsg && input.required && (value === '' || value === undefined || value === null || (input.type === InputVarType.files && value.length === 0)))
errMsg = t('workflow.errorMsg.fieldRequired', { field: input.label })
errMsg = t('workflow.errorMsg.fieldRequired', { field: typeof input.label === 'object' ? input.label.variable : input.label })
})
})
if (errMsg) {