diff --git a/packages/hello-gsm/src/PageContainer/CalculatorPage/index.tsx b/packages/hello-gsm/src/PageContainer/CalculatorPage/index.tsx index d84622498..b0e6a1c7a 100644 --- a/packages/hello-gsm/src/PageContainer/CalculatorPage/index.tsx +++ b/packages/hello-gsm/src/PageContainer/CalculatorPage/index.tsx @@ -599,6 +599,9 @@ const CalculatorPage: NextPage = ({ {...register(`absentValue.${i}`, { required: true, valueAsNumber: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" placeholder="입력" @@ -613,6 +616,9 @@ const CalculatorPage: NextPage = ({ {...register(`attendanceValue.${i}`, { required: true, valueAsNumber: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" placeholder="입력" @@ -627,6 +633,9 @@ const CalculatorPage: NextPage = ({ {...register(`attendanceValue.${3 + i}`, { required: true, valueAsNumber: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" placeholder="입력" @@ -641,6 +650,9 @@ const CalculatorPage: NextPage = ({ {...register(`attendanceValue.${6 + i}`, { required: true, valueAsNumber: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" placeholder="입력" @@ -654,6 +666,9 @@ const CalculatorPage: NextPage = ({ {...register(`volunteerValue.${i}`, { required: true, valueAsNumber: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" placeholder="입력" diff --git a/packages/hello-gsm/src/PageContainer/GEDCalculatorPage/index.tsx b/packages/hello-gsm/src/PageContainer/GEDCalculatorPage/index.tsx index aa1980518..17bb669f6 100644 --- a/packages/hello-gsm/src/PageContainer/GEDCalculatorPage/index.tsx +++ b/packages/hello-gsm/src/PageContainer/GEDCalculatorPage/index.tsx @@ -139,6 +139,9 @@ const GEDCalculatorPage: NextPage = ({ {...register('curriculumScoreSubtotal', { valueAsNumber: true, required: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" /> @@ -146,6 +149,9 @@ const GEDCalculatorPage: NextPage = ({ {...register('nonCurriculumScoreSubtotal', { valueAsNumber: true, required: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" /> diff --git a/packages/hello-gsm/src/PageContainer/Test/GEDCalculatorPage/index.tsx b/packages/hello-gsm/src/PageContainer/Test/GEDCalculatorPage/index.tsx index 99f2490f2..a4be71b44 100644 --- a/packages/hello-gsm/src/PageContainer/Test/GEDCalculatorPage/index.tsx +++ b/packages/hello-gsm/src/PageContainer/Test/GEDCalculatorPage/index.tsx @@ -55,6 +55,9 @@ const TestGEDCalculatorPage: NextPage = () => { {...register('curriculumScoreSubtotal', { valueAsNumber: true, required: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" /> @@ -62,6 +65,9 @@ const TestGEDCalculatorPage: NextPage = () => { {...register('nonCurriculumScoreSubtotal', { valueAsNumber: true, required: true, + validate: { + nagativeNumber: value => !(value < 0), + }, })} type="number" /> diff --git a/packages/hello-gsm/src/shared/acceptable.ts b/packages/hello-gsm/src/shared/acceptable.ts index e9fbd608e..345ce88d2 100644 --- a/packages/hello-gsm/src/shared/acceptable.ts +++ b/packages/hello-gsm/src/shared/acceptable.ts @@ -1,6 +1,6 @@ // 10월 17일 9시부터 10월 20일 17시 까지 -const acceptable = true; -// new Date() >= new Date('2022-10-17 9:00') && -// new Date() <= new Date('2022-10-20 17:00'); +const acceptable = + new Date() >= new Date('2022-10-17 9:00') && + new Date() <= new Date('2022-10-20 17:00'); export default acceptable;