public class MethodArgumentNotValidException extends BindException
@Valid fails.
Extends BindException as of 5.3.MODEL_KEY_PREFIXNESTED_PATH_SEPARATOR| Constructor and Description |
|---|
MethodArgumentNotValidException(MethodParameter parameter,
BindingResult bindingResult)
Constructor for
MethodArgumentNotValidException. |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage()
Returns diagnostic information about the errors held in this object.
|
MethodParameter |
getParameter()
Return the method parameter that failed validation.
|
addAllErrors, addError, equals, findEditor, getAllErrors, getBindingResult, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getFieldErrors, getFieldErrors, getFieldType, getFieldValue, getGlobalError, getGlobalErrorCount, getGlobalErrors, getModel, getNestedPath, getObjectName, getPropertyEditorRegistry, getRawFieldValue, getSuppressedFields, getTarget, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, hashCode, popNestedPath, pushNestedPath, recordFieldValue, recordSuppressedField, reject, reject, reject, rejectValue, rejectValue, rejectValue, resolveMessageCodes, resolveMessageCodes, setNestedPathaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MethodArgumentNotValidException(MethodParameter parameter, BindingResult bindingResult)
MethodArgumentNotValidException.parameter - the parameter that failed validationbindingResult - the results of the validationpublic final MethodParameter getParameter()
public String getMessage()
BindExceptiongetMessage in class BindException