I am writing JSR validation for following inputs.
@JsonProperty(value = "state")
@NotEmpty
private String state;
@JsonProperty(value = "zipValue")
@NotEmpty
@Zip
private String zip;
@JsonProperty(value = "countryName")
@NotEmpty
@CountryAddress
private String countryName;
I am getting inputs from 2 countries. Hence state list and zip code format of countries are different.I want to validate both zip and state in the CountryAddress annotation itself.Could someone help me on this.?