package org.zalando.problem.spring.web.advice.validation;

import org.zalando.problem.spring.web.advice.AdviceTrait;

/**
 * @see AdviceTrait
 */
public interface ValidationAdviceTrait extends
        ConstraintViolationAdviceTrait,
        MethodArgumentNotValidAdviceTrait {
}

@@ -115,16 +115,1001 @@
 t;%0A%0A/**%0A
+ * Advice trait to handle any validation exceptions.%0A * %3Cp%3E%0A * Be careful if you use %7B@link org.springframework.validation.beanvalidation.MethodValidationPostProcessor%7D%0A * in order to validate method parameter field directly but %7B@code violations%5B%5D.field%7D value looks like %7B@code arg0%7D%0A * instead of parameter name, you have to configure a%0A * %7B@link org.springframework.validation.beanvalidation.LocalValidatorFactoryBean%7D with your%0A * %7B@link org.springframework.validation.beanvalidation.MethodValidationPostProcessor%7D like following:%0A *%0A * %3Cpre%3E%3Ccode%3E%0A *  @Bean%0A *  public Validator validator() %7B%0A *      return new LocalValidatorFactoryBean();%0A *  %7D%0A *%0A *  @Bean%0A *  public MethodValidationPostProcessor methodValidationPostProcessor() %7B%0A *      MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor();%0A *      methodValidationPostProcessor.setValidator(validator());%0A *      return methodValidationPostProcessor;%0A *  %7D%0A * %3C/code%3E%3C/pre%3E%0A *%0A
  * @see 

Add some tips when using Spring method validation