@ Valid annotation, how to control the order of object validation

public JsonResult add(@Valid Person person, BindingResult bindingResult) {
    // bindingResult.getAllErrors()
    // :;;
    // 
}

1, or manually verify, controllable
2, spring uses hibernate-validator, he supports a way called grouping, but there are a lot of changes, not elegant.
you can take a look at the link description


you can sort it yourself, traverse it with bindingResult.getFieldErrors, or use bindingResult.getAllErrors () and convert it to FieldError (if you can), and then sort it yourself by field.

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-1b36a99-4d6cd.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-1b36a99-4d6cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?