-
Notifications
You must be signed in to change notification settings - Fork 15
Validation
Regunath B edited this page Jul 19, 2018
·
5 revisions
Hibernate Validator is packaged with GJEX using the guice-validator library.
Individual field can be validated using javax.validation annotations like below:
@NotBlank
private String greeting;
@NotNull
private Integer age;
public HelloBean() {
}
Method arguments can be validated like below:
public void sayHello(@NotNull @Valid HelloBean helloBean) {
....
}
See guice-validator for more examples