Class MethodArgumentNotValidException

All Implemented Interfaces:
Serializable, BindingResult, Errors

public class MethodArgumentNotValidException extends BindException
Exception to be thrown when validation on an argument annotated with @Valid fails. Extends BindException as of 5.3.
Since:
3.1
Author:
Rossen Stoyanchev, Juergen Hoeller
See Also:
  • Constructor Details

  • Method Details

    • getParameter

      public final MethodParameter getParameter()
      Return the method parameter that failed validation.
    • getMessage

      public String getMessage()
      Description copied from class: BindException
      Returns diagnostic information about the errors held in this object.
      Overrides:
      getMessage in class BindException