package org.jooby.hbm.data;

import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

public class Car {

  @NotEmpty
  private String manufacturer;

  @NotEmpty
  @Size(min = 2, max = 14)
  private String licensePlate;

  @Min(2)
  private int seatCount;

  public Car(final String manufacturer, final String licencePlate, final int seatCount) {
    this.manufacturer = manufacturer;
    this.licensePlate = licencePlate;
    this.seatCount = seatCount;
  }

  public String getManufacturer() {
    return manufacturer;
  }

  public void setManufacturer(final String manufacturer) {
    this.manufacturer = manufacturer;
  }

  public String getLicensePlate() {
    return licensePlate;
  }

  public void setLicensePlate(final String licensePlate) {
    this.licensePlate = licensePlate;
  }

  public int getSeatCount() {
    return seatCount;
  }

  public void setSeatCount(final int seatCount) {
    this.seatCount = seatCount;
  }

  @Override
  public String toString() {
    return manufacturer;
  }

}

@@ -191,17 +191,47 @@
 NotEmpty
+(message = %22may not be empty%22)
 %0A
-
   privat
@@ -265,16 +265,46 @@
 NotEmpty
+(message = %22may not be empty%22)
 %0A  @Size
@@ -362,17 +362,73 @@
 %0A  @Min(
-2
+value = 2, message = %22must be greater than or equal to 2%22
 )%0A  priv

FIx #309 hardcoded BeanValidation constraint violation messages to default US locale messages