2 Replies Latest reply on Feb 17, 2008 1:27 PM by pmuir

    Validation Documentation Incomplete

    dhinojosa

       


      Well, that's a decent first cut, but in practice it might be more elegant to use custom constraints instead of the ones built into Hibernate Validator:
      public class Location {
       private String country;
       private String zip;
      
       @NotNull
       @Country
       public String getCountry() { return country; }
       public void setCountry(String c) { country = c; }
      
       @NotNull
       @ZipCode
       public String getZip() { return zip; }
       public void setZip(String z) { zip = z; }
      }
      



      Hey, that's great, but doesn't show how or give a reference on where to find out more.