From fe015ebb6e3367b61220905b1ea99e6a1f99095f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EA=B8=B0=EC=98=81?= Date: Fri, 9 Aug 2024 15:51:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=A4=EB=A5=B8=20=EB=B6=80=EB=B6=84?= =?UTF-8?q?=20maxLength=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/AuthForm/InputBox.jsx | 1 + frontend/src/components/InfoEditForm/InfoEditForm.jsx | 2 ++ frontend/src/components/LectureForm/LectureForm.jsx | 4 ++++ .../src/components/PasswordChangeForm/PasswordChangeForm.jsx | 3 +++ frontend/src/components/QuizForm/QuizCard.jsx | 3 +++ frontend/src/components/QuizForm/QuizsetForm.jsx | 2 +- 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/AuthForm/InputBox.jsx b/frontend/src/components/AuthForm/InputBox.jsx index 1c108f3..0e5da9d 100644 --- a/frontend/src/components/AuthForm/InputBox.jsx +++ b/frontend/src/components/AuthForm/InputBox.jsx @@ -15,6 +15,7 @@ export default forwardRef(function InputBox({ title, id = null, type, hasError = id={id} className={`${styles.input} ${styles.textSubheading}`} ref={ref} + maxLength={200} required /> {children} diff --git a/frontend/src/components/InfoEditForm/InfoEditForm.jsx b/frontend/src/components/InfoEditForm/InfoEditForm.jsx index 58f1040..0bef152 100644 --- a/frontend/src/components/InfoEditForm/InfoEditForm.jsx +++ b/frontend/src/components/InfoEditForm/InfoEditForm.jsx @@ -27,6 +27,7 @@ export default function InfoEditForm({ name, email, onSubmit, usingEmail }) { placeholder="이름" type="text" id="username" + maxLength={200} className={`${styles.input} ${styles.textBody}`} value={username} onChange={(e) => setUsername(e.target.value)} @@ -47,6 +48,7 @@ export default function InfoEditForm({ name, email, onSubmit, usingEmail }) { id="useremail" className={`${styles.input} ${styles.textBody} ${usingEmail && styles.errorBox}`} value={useremail} + maxLength={200} onChange={(e) => setUseremail(e.target.value)} required /> diff --git a/frontend/src/components/LectureForm/LectureForm.jsx b/frontend/src/components/LectureForm/LectureForm.jsx index 5682e8e..ecd2806 100644 --- a/frontend/src/components/LectureForm/LectureForm.jsx +++ b/frontend/src/components/LectureForm/LectureForm.jsx @@ -66,6 +66,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = { @@ -74,6 +75,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = { @@ -82,6 +84,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = { @@ -104,6 +107,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = { diff --git a/frontend/src/components/PasswordChangeForm/PasswordChangeForm.jsx b/frontend/src/components/PasswordChangeForm/PasswordChangeForm.jsx index 47dff75..7c95ef8 100644 --- a/frontend/src/components/PasswordChangeForm/PasswordChangeForm.jsx +++ b/frontend/src/components/PasswordChangeForm/PasswordChangeForm.jsx @@ -37,6 +37,7 @@ export default function PasswordChangeForm({ onSubmit, pwError = false }) { type="password" id="currentPassword" ref={currentPasswordRef} + maxLength={200} className={errorSameMessage ? styles.inputErrorBox : styles.inputBox} required /> @@ -48,6 +49,7 @@ export default function PasswordChangeForm({ onSubmit, pwError = false }) { type="password" id="newPassword" ref={newPasswordRef} + maxLength={200} className={styles.inputBox} required /> @@ -58,6 +60,7 @@ export default function PasswordChangeForm({ onSubmit, pwError = false }) { type="password" id="confirmPassword" ref={confirmPasswordRef} + maxLength={200} className={errorConfirmMessage ? styles.inputErrorBox : styles.inputBox} required /> diff --git a/frontend/src/components/QuizForm/QuizCard.jsx b/frontend/src/components/QuizForm/QuizCard.jsx index 8127169..a7dcabe 100644 --- a/frontend/src/components/QuizForm/QuizCard.jsx +++ b/frontend/src/components/QuizForm/QuizCard.jsx @@ -86,6 +86,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) { { setQuestion(e.target.value); updateQuiz(quiz.id, { ...quiz, question: e.target.value, answer, choices, image }); @@ -97,6 +98,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) { { setAnswer(e.target.value); updateQuiz(quiz.id, { ...quiz, question, answer: e.target.value, choices, image }); @@ -134,6 +136,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) { handleChoiceChange(choice.num, e.target.value)} placeholder={`Choice ${choice.num}`} diff --git a/frontend/src/components/QuizForm/QuizsetForm.jsx b/frontend/src/components/QuizForm/QuizsetForm.jsx index 940f5a1..84f7f0a 100644 --- a/frontend/src/components/QuizForm/QuizsetForm.jsx +++ b/frontend/src/components/QuizForm/QuizsetForm.jsx @@ -54,7 +54,7 @@ export default function QuizsetForm({ headerTitle, topic, to, onSubmit, initialV setTitle(e.target.value)} placeholder="퀴즈셋 제목을 입력해주세요"