See @Pattern and @NotNull:
http://java.net/projects/jax-rs-spec/pages/Validation