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.

Spring MVC - @Valid on list of beans in REST service

In a Spring MVC REST service (json), I have a controller method like this one : @RequestMapping(method = RequestMethod.POST, value = { "/…

java spring rest spring-mvc bean-validation
How to manually trigger spring validation?

The annotated spring validation on fields of a POJO works when it is created from json request body. However, when …

java spring spring-boot bean-validation
Validating double and float values using Hibernate Validator - bean validation

I'm looking for a way to validate a java.lang.Double field in the Spring command bean for its maximum …

spring validation spring-mvc bean-validation hibernate-validator
Implementing custom validation logic for a spring boot endpoint using a combination of JSR-303 and Spring's Validator

I'm trying to implement some custom validation logic for a spring boot endpoint using a combination of JSR-303 Bean Validation …

java spring validation spring-boot bean-validation
Bean validation size of a List?

How can I set a bean validation constraint that a List should at minimum contain 1 and at maximum contain 10 elements? …

java bean-validation
Hibernate Validation of Collections of Primitives

I want to be able to do something like: @Email public List<String> getEmailAddresses() { return this.emailAddresses; } In …

java collections bean-validation hibernate-validator
Validate Mobile Number using Hibernate annotation

I have a entity called User and I want to validate a mobile number field The mobile number field is …

java bean-validation hibernate-validator phone-number
How do I import javax.validation into my Java SE project?

I'm trying to add constraints checking, as described here How to specify the cardinality of a @OneToMany in EclipseLink/JPA

jpa jakarta-ee eclipselink hibernate-validator bean-validation
How do I use @Valid with Spring MVC's @RequestBody parameters?

I'm having an issue with using @Valid on a parameter to a handler method on my @Controller. My code looks …

spring validation data-binding spring-mvc bean-validation
How to handle Resource validation in REST webservices?

I'm building a REST webservice in Java using Spring, Jersey and Hibernate (JPA). Now I'm trying to add support for …

java rest jpa jersey bean-validation