주관식 입력 폼 검증
This commit is contained in:
@@ -223,6 +223,14 @@ document.getElementById('step3Form').addEventListener('submit', async function(e
|
||||
const formData = new FormData(this);
|
||||
const data = Object.fromEntries(formData);
|
||||
|
||||
// 7번 문항 검증 (기타의견란에 작성 필요)
|
||||
const otherOpinions = data.other_opinions || '';
|
||||
if (!otherOpinions.trim() || !otherOpinions.includes('7번:')) {
|
||||
alert('7번 문항은 기타의견란에 "7번: "으로 시작하여 답변해주세요.');
|
||||
document.getElementById('other_opinions').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch('/step3', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user