fix: 다른 부분 maxLength 추가

This commit is contained in:
정기영 2024-08-09 15:51:02 +09:00
parent 1a0b020ec5
commit fe015ebb6e
6 changed files with 14 additions and 1 deletions

View File

@ -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}

View File

@ -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
/>

View File

@ -66,6 +66,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<input
className={styles.input}
ref={titleRef}
maxLength={200}
type="text"
placeholder="강의명을 입력하세요"
/>
@ -74,6 +75,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<label className={styles.label}>설명</label>
<textarea
ref={descriptionRef}
maxLength={1000}
className={styles.textarea}
placeholder="강의에 대한 설명을 입력하세요"
></textarea>
@ -82,6 +84,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<label className={styles.label}>강의 계획</label>
<textarea
ref={planRef}
maxLength={1000}
className={styles.textarea}
placeholder="강의 계획을 입력하세요"
></textarea>
@ -104,6 +107,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<input
type="text"
ref={timeRef}
maxLength={200}
className={styles.input}
placeholder="실제 강의 진행 시간을 입력하세요"
/>

View File

@ -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
/>

View File

@ -86,6 +86,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) {
<input
type="text"
value={question}
maxLength={200}
onChange={(e) => {
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 }) {
<input
type="text"
value={answer}
maxLength={200}
onChange={(e) => {
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 }) {
<input
className={`${styles.input} ${styles.choiceInput}`}
type="text"
maxLength={200}
value={choice.content}
onChange={(e) => handleChoiceChange(choice.num, e.target.value)}
placeholder={`Choice ${choice.num}`}

View File

@ -54,7 +54,7 @@ export default function QuizsetForm({ headerTitle, topic, to, onSubmit, initialV
<input
className={styles.input}
type="text"
maxLength={255}
maxLength={200}
value={title}
onChange={(e) => setTitle(e.target.value)}
placeholder="퀴즈셋 제목을 입력해주세요"