Skip to content

Commit

Permalink
fix: admin 요청 제한 조건 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
belljun3395 committed Jul 1, 2024
1 parent 1dc3abe commit b66d4ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ data class ProblemDto(
val explanation: String
)
data class ProblemContentDto(
@field:NotBlank(message = "{min.problem.number}")
val number: Long,
@field:NotBlank(message = "{problem.content.notblank}")
val content: String
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.few.api.web.controller.admin.request

import jakarta.validation.constraints.Max
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotBlank

Expand All @@ -9,7 +8,6 @@ data class MapArticleRequest(
val workbookId: Long,
@field:NotBlank(message = "{min.id}")
val articleId: Long,
@field:Min(value = 1, message = "{min.id}")
@field:Max(value = 7, message = "{max.day}")
@field:Min(value = 1, message = "{min.day}")
val dayCol: Int
)
2 changes: 2 additions & 0 deletions api/src/main/resources/ValidationMessages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ title.notblank=Title must not be blank
category.notblank=Category must not be blank
content.source.notblank=Content must not be blank
problem.title.notblank=Problem Title must not be blank
problem.content.notblank=Problem Content must not be blank
problem.answer.notblank=Problem Answer must not be blank
problem.explanation.notblank=Problem Category must not be blank
workbook.title.notblank=Workbook Title must not be blank
workbook.description.notblank=Workbook Description must not be blank
min.day=The Day field must be greater than or equal to 1
min.id=The ID field must be greater than or equal to 1
min.problem.number=The Problem Number field must be greater than or equal to 1
max.day=The Day field must be less than or equal to 7

0 comments on commit b66d4ff

Please sign in to comment.