How Java validation verifies List

Annotations from the validation framework are used in the

entity class, such as @ NotNull.
@ Validation User user the entity class in Controller to determine whether it meets the requirements.

but if it is a list object, such as @ Validation List < User > userList, the validation framework will fail. What can I do to be ineffective?

Mar.14,2021

try another annotation, @ Size (min=, max=) to verify that the length of the object (Array,Collection,Map,String) is within a given interval.


use this annotation @ Valid, to implement the verification function


and wrap it again with @ Valid

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5372f-449bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5372f-449bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?