Top "Bean-validation" questions

Bean Validation, previously commonly called just "JSR-303", is an annotation based validation framework for javabean properties and parameters of arbitrary methods.

Cross field validation with Hibernate Validator (JSR 303)

Is there an implementation of (or third-party implementation for) cross field validation in Hibernate Validator 4.x? If not, what is …

validation hibernate-validator bean-validation
Annotations from javax.validation.constraints not working

What configuration is needed to use annotations from javax.validation.constraints like @Size, @NotNull, etc.? Here's my code: import javax.…

java spring annotations constraints bean-validation
JSR 303 Validation, If one field equals "something", then these other fields should not be null

I'm looking to do a little custom validation with JSR-303 javax.validation. I have a field. And If a certain …

java validation bean-validation
How can I validate two or more fields in combination?

I'm using JPA 2.0/Hibernate validation to validate my models. I now have a situation where the combination of two fields …

java jpa jpa-2.0 bean-validation
javax.validation.ValidationException: Unable to find default provider

I am currently working on Spring MVC web app and trying to hook up validation using the @Valid annotation. When …

java spring bean-validation hibernate-validator
javax.servlet.ServletException: HV000030: No validator could be found for type: java.lang.Integer

I have to update information in my database. FacadePatient.java class code: public Patient update(Patient p) { Patient pat = em.…

jakarta-ee bean-validation hibernate-validator
Validate positive integers

I want to allow only positive integers for number fields including zero. How can I define this validation using JSR 303 ? …

java bean-validation
@Pattern for alphanumeric string - Bean validation

I have a variable name in a bean. I want to add @Pattern validation to accept only alphanumeric. Currently, I …

java regex annotations bean-validation
Bean Validation @NotNull, @NotBlank and @NotEmpty does not work in JSF+Tomcat

I am using Hibernate Validation annotations in my JSF managed bean. When I use @NotNull, @NotBlank or @NotEmpty they doesn't …

jsf tomcat jsf-2 bean-validation
In Hibernate Validator 4.1+, what is the difference between @NotNull, @NotEmpty, and @NotBlank?

I can't seem to be able to find a summary that distinguishes the difference between these three annotations.

java hibernate validation bean-validation