Here's the code:
data class Father(
@Valid
val sonExamResult: Son.ExamResult
)
data class Son(
val examResult:ExamResult
){
data class ExamResult(
@field: Size(min = 0, max = 100)
val math:Int,
@field: Size(min = 0, max = 100)
val physicalEducation:Int
)
}
How can I verify a data structure similar to the above? I try to pass a -1
to ExamResult.math
, but nothing happend.
My native language is not English, I am very sorry for the word error.
Thank you for your help!