title: Spring IP address validation
body: <p>I'm looking for a possiblity to validate IP addresses in my Spring roo project.</p>
  
  <p>My entity looks like this</p>
  
  <pre><code>package com.ip.test.domain;
  
  import javax.persistence.ManyToOne;
  import javax.validation.constraints.NotNull;
  import javax.validation.constraints.Size;
  import org.springframework.roo.addon.javabean.RooJavaBean;
  import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
  import org.springframework.roo.addon.tostring.RooToString;
  
  @RooJavaBean
  @RooToString
  @RooJpaActiveRecord
  public class IP {
  
  @NotNull
  @Size(min = 7, max = 15)
  private String ip;
  
  @ManyToOne
  private Hoster Hoster;
  }
  </code></pre>
  
  <p>With this setup it validates only if the string contains 7 to 15 characters, but not really if it's an IP address. </p>
  
  <p>Something like</p>
  
  <pre><code>@validIpAddress
  private String ip;
  </code></pre>
  
  <p>would be nice.</p>
  
  <p>Any idea if that's possible?</p>