fix: Alert 메세지 변경

- 제출 confirm 메세지 내용 변경
- 최대/최소 값 입력 시 alert 처리
This commit is contained in:
Dayoung 2025-07-02 10:35:47 +09:00
parent 9c9ddd16b6
commit 163432dc99
3 changed files with 25 additions and 6 deletions

View File

@ -256,7 +256,13 @@ export default function RegistForm() {
className="input-frame"
type="text"
placeholder="お問い合わせタイトルを記入してください"
onChange={(e) => setInquiryRequest({ ...inquiryRequest, title: e.target.value })}
onChange={(e) => {
if (e.target.value.length >= 100) {
showErrorAlert(WARNING_MESSAGE.TITLE_MAX_LENGTH)
return
}
setInquiryRequest({ ...inquiryRequest, title: e.target.value })
}}
maxLength={100}
id="title"
/>
@ -272,7 +278,13 @@ export default function RegistForm() {
rows={6}
id="contents"
placeholder="お問い合わせ内容を入力してください"
onChange={(e) => setInquiryRequest({ ...inquiryRequest, contents: e.target.value })}
onChange={(e) => {
if (e.target.value.length >= 2000) {
showErrorAlert(WARNING_MESSAGE.CONTENTS_MAX_LENGTH)
return
}
setInquiryRequest({ ...inquiryRequest, contents: e.target.value })
}}
value={inquiryRequest.contents}
maxLength={2000}
></textarea>

View File

@ -262,7 +262,14 @@ export default function RoofForm(props: {
id="memo"
value={roofInfo?.memo ?? ''}
disabled={mode === 'READ'}
onChange={(e) => setRoofInfo({ ...roofInfo, memo: e.target.value })}
onChange={(e) => {
if (e.target.value.length >= 2000) {
showErrorAlert(WARNING_MESSAGE.CONTENTS_MAX_LENGTH)
return
}
setRoofInfo({ ...roofInfo, memo: e.target.value })
}}
maxLength={2000}
></textarea>
</div>
</div>

View File

@ -28,8 +28,8 @@ export const SUCCESS_MESSAGE = {
* @description
*/
export const CONFIRM_MESSAGE = {
/** 제출 확인 - "제출하시겠습니까?" */
SUBMIT_CONFIRM: '提出しますか?',
/** 제출 확인 - "전송하시겠습니까? 전송 후에는 수정/삭제 할 수 없습니다." */
SUBMIT_CONFIRM: '送信しますか? 送信後は変更・修正することはできません。',
/** 저장 확인 - "저장하시겠습니까?" */
SAVE_CONFIRM: '保存しますか?',
@ -56,7 +56,7 @@ export const WARNING_MESSAGE = {
EMAIL_PREFIX_IS_INVALID: '有効なメールアドレスを入力してください。',
/** 최소값 오류 - "2자 이상 입력하세요" */
KEYWORD_MINIMUM_LENGTH: '2文字以上入力してください',
KEYWORD_MINIMUM_LENGTH: 'タイトルを入力してください2文字以上',
/** 최대값 오류 - "30자 이내로 입력하세요" */
KEYWORD_MAX_LENGTH: '30文字以内で入力してください',