261007_01_ENH: 메시지 API contact-back 경유 전환, 발송 경로 변경 및 발신 이메일 형식 검증 추가
This commit is contained in:
@@ -33,7 +33,7 @@ import { downloadFile } from "@kri/common/browser";
|
||||
import {cn} from "@/lib/utils";
|
||||
import {ProjectMainTemplateUpdateRequest, ProjectSurvey} from "@/types/project";
|
||||
import type { DataVerification } from "@kri/common";
|
||||
import {COMMON_TEXT_REGEX} from "@/const/validationConst";
|
||||
import {COMMON_TEXT_REGEX, EMAIL_REGEX} from "@/const/validationConst";
|
||||
import {formatKoreanPhoneNumber} from "@/utils/phone";
|
||||
import type {
|
||||
TemplateAttachmentImage,
|
||||
@@ -260,6 +260,7 @@ const MessageTemplate = ({ pageTitle, defaultTemplate }: MessageTemplateProps) =
|
||||
if (isBlank(tpl.sendEml)) return fail("sendEml", "발신 이메일을 입력해 주세요.");
|
||||
if (tpl.sendEml.length > 64) return fail("sendEml", "발신 이메일은 64자 이하로 입력해주세요.");
|
||||
if (!COMMON_TEXT_REGEX.test(tpl.sendEml)) return fail("sendEml", "발신 이메일에 허용되지 않는 문자가 포함되어 있습니다.");
|
||||
if (!EMAIL_REGEX.test(tpl.sendEml)) return fail("sendEml", "발신 이메일 형식이 올바르지 않습니다.");
|
||||
return ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user