title: @Valid when creating objects with jackson without controller
body: <p>I have a model that I validate with @Valid in my Controllers when requests are send from the front-end:</p>
  
  <pre><code>@NotNull
  @Size(min=1, message="Name should be at least 1 character.")
  private String name;
  
  @NotNull
  @Pattern(regexp = "^https://github.com/.+/.+$", message = "Link to github should match https://github.com/USER/REPOSITORY")
  private String github;
  </code></pre>
  
  <p>but now I am also creating a object with Jackson's ObjectMapper without the controller. Is there a way to register this validation in the ObjectMapper or should I just check the variables in the setters?</p>