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.

Bean Validation Groups - Understanding it correctly

I am trying to understand the Groups in Bean validation. So for instance if I have a bean and I …

java javabeans bean-validation
java.lang.NoSuchMethodError: javax.validation.BootstrapConfiguration.getClockProviderClassName

JDK: 1.8.0_131 Tomcat: 8.0.27.0 Hibernate Validator: 6.0.7.Final + all the dependencies downloaded from: Hibernate Validator 6 @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_…

java hibernate validation bean-validation hibernate-validator
Can you change an annotation message at run time?

I'm trying to include a dynamic message in my annotation that changes the main body of the text based on …

java bean-validation
Multiple Regex @Pattern's for 1 Field?

I was attempted to apply multiple @Pattern annotations to a single field: @Pattern(regexp = "(?=.*[0-9])", message = "Password must contain one …

regex jakarta-ee bean-validation
How to use @Pattern on non-mandatory fields JSR 303

How can i use @Pattern constraint on non-mandatory form fields ? @Pattern(regexp="...") private String something; as soon as i submit …

java validation spring-mvc bean-validation
Why can't I use Valid parameter along with RequestParam in Spring MVC?

Example: public String getStudentResult(@RequestParam(value = "regNo", required = true) String regNo, ModelMap model){ How can I use @valid for the …

spring spring-mvc bean-validation
Java Bean Validation (JSR303) constraints involving relationship between several bean properties

Say I have the following simple java bean: class MyBean { private Date startDate; private Date endDate; //setter, getters etc... } Is …

java validation bean-validation
JSF 2.0: How to skip JSR-303 bean validation?

How to skip JSR-303 Bean validation with JSF, when a button is clicked? A bit lengthy question to explain a …

jsf jsf-2 facelets bean-validation
Using a custom ResourceBundle with Hibernate Validator

I'm trying to set up a custom message source for Hibernate Validator 4.1 through Spring 3.0. I've set up the necessary configuration: &…

spring bean-validation hibernate-validator
Hibernate @OneToOne @NotNull

Is it valid to declare @OneToOne and @NotNull on both sides of a relationship, such as: class ChangeEntry { @OneToOne(cascade=…

java hibernate orm jpa bean-validation