Kevin Rave Kevin Rave - 1 year ago 235
Java Question

Hibernate @NotEmpty annotation equivalent in Javax.package or alternative

Is there a way to implement

hibernate validation without writing custom validation?
javax.validation package does not contain this annotation. Only
. But it does not validate for Non-null but empty values. So I would like to see an alternative for

? How?

Answer Source

NotEmpty is just a combination of @NotNull and @Size(min=1).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download