spring-framework / org.springframework.web.bind / MethodArgumentNotValidException

MethodArgumentNotValidException

open class MethodArgumentNotValidException : Exception

Exception to be thrown when validation on an argument annotated with @Valid fails.

Author
Rossen Stoyanchev

Since
3.1

Constructors

<init>

MethodArgumentNotValidException(parameter: MethodParameter, bindingResult: BindingResult)

Constructor for MethodArgumentNotValidException.

Properties

message

open val message: String

Functions

getBindingResult

open fun getBindingResult(): BindingResult

Return the results of the failed validation.

getParameter

open fun getParameter(): MethodParameter

Return the method parameter that failed validation.