diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx index b8f71501fc..8797249b0b 100644 --- a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx +++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx @@ -54,6 +54,13 @@ const EmailConfigureModal = ({ }) return false } + if (!/{{#url#}}/.test(body.trim())) { + Toast.notify({ + type: 'error', + message: `body must contain one ${t('common.promptEditor.requestURL.item.title')}`, + }) + return false + } if (!recipients || (recipients.items.length === 0 && !recipients.whole_workspace)) { Toast.notify({ type: 'error', diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx index d32ff37627..166ca6a36b 100644 --- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx +++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx @@ -9,6 +9,7 @@ import { PortalToFollowElemContent, PortalToFollowElemTrigger, } from '@/app/components/base/portal-to-follow-elem' +import cn from '@/utils/classnames' const i18nPrefix = 'workflow.nodes.humanInput' @@ -103,7 +104,7 @@ const EmailInput = ({ return (
{selectedEmails.map(item => ( diff --git a/web/app/components/workflow/nodes/human-input/components/timeout.tsx b/web/app/components/workflow/nodes/human-input/components/timeout.tsx index 5d700c36b2..1c4196f7df 100644 --- a/web/app/components/workflow/nodes/human-input/components/timeout.tsx +++ b/web/app/components/workflow/nodes/human-input/components/timeout.tsx @@ -18,6 +18,14 @@ const TimeoutInput: FC = ({ onChange, }) => { const { t } = useTranslation() + + const handleValueChange = (e: React.ChangeEvent) => { + const value = e.target.value + if (/^\d*$/.test(value)) + onChange({ timeout: Number(value) || 1, unit }) + else + onChange({ timeout: 1, unit }) + } return (
= ({ type='number' value={timeout} min={1} - onChange={e => onChange({ timeout: Number(e.target.value), unit })} + onChange={handleValueChange} />