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.

How do I construct a ConstraintViolationException?

I am puzzled by the javax.validation API. I am writing a simple test to understand it : Sample sample = new …

java generics bean-validation
Cross field validation with HibernateValidator displays no error messages

I'm validating two fields, "password" and "confirmPassword" on the form for equality using HibernateValidator as specified in this answer. The …

spring jsp spring-mvc bean-validation hibernate-validator
JSR 303 Bean Validation + Javascript Client-Side Validation

What is the best way to perform client-side form validation using Javascript (with minimal code duplication) when using JSR 303 bean …

java javascript spring validation bean-validation
JSR-303 dependency injection and Hibernate

Spring 3.0.2, Hibernate 3.5.0, Hibernate-Validator 4.0.2.GA I am trying to inject Spring dependencies into a ConstraintValidator using: @PersistenceContext private EntityManager entityManager; I …

hibernate spring dependency-injection validation bean-validation
javax.validation.NotBlank missing validator

I have requirement that in common api module(multi module project) I can't use any kind of hibernate's validation annotations, …

java spring hibernate bean-validation hibernate-validator
HTTP Status 500 - Handler processing failed; nested exception is java.lang.AbstractMethodError:

Please help me with learning the basics of Spring 3 MVC better, I was trying to learn about Spring JSR 303: Bean …

spring-mvc bean-validation spring-3 jsr validationerror
Good patterns for unit testing form beans that have annotation-based validation in Spring MVC

When using annotation based validation for a form bean, what is the best practice for unit-testing those beans in order …

java unit-testing spring-mvc annotations bean-validation
Javax validation on nested objects - not working

In my Spring Boot project I have two DTO's which I'm trying to validate, LocationDto and BuildingDto. The LocationDto has …

java spring spring-boot bean-validation
What setup do I need to do to use JSR-303 annotations with Spring?

I downloaded spring 3 and put it on my classpath but I'm not able to import the @Valid annotation. However, I …

java spring bean-validation
Why session bean method throw EjbTransactionRolledbackException when RuntimeException was thrown

I am trying to persist the entity with constraint validation, when invoke persist - there is constraint that thrown and …

java java-ee-6 jpa-2.0 ejb-3.1 bean-validation