@ ExceptionHandler ( MethodArgumentNotValidException . class ) @ ResponseStatus ( HttpStatus . BAD_REQUEST ) @ ResponseBody public ValidationResultInterface processValidationError ( final MethodArgumentNotValidException pexception ) { final BindingResult result = pexception . getBindingResult ( ) ; final List < FieldError > fieldErrors = result . getFieldErrors ( ) ; return processFieldErrors ( fieldErrors ) ; }
handle validation errors .