Bean Validation

Spring Boot Request Validation for Body and Parameters

Learn how Spring Boot checks the JSON body, path variables and query parameters of a REST request. See which exception Spring throws, how to return clear field errors, and how to validate nested objects and lists, use groups, write a custom rule and test with MockMvc on Spring Boot 4.1.1.

Hibernate Validator CDI: Inject Validator with Weld SE

Hibernate Validator CDI lets the CDI container create the ValidatorFactory and Validator. Learn to inject them with Weld SE, use @Inject inside a ConstraintValidator, and get automatic method validation on CDI beans.

Spring Bean Validation – JSR-303 Annotations

JSR-303 bean validation is an specification whose objective is to standardize the validation of Java beans through annotations. The objective of the JSR-303 standard is to use annotations directly in a Java bean class. JSR 303 specification allows the validation rules to be specified directly into the fields inside any …

Spring MVC Custom Validator Example

In spring mvc form submit tutorial, we learned about displaying displaying a form and submitting form data, including validating inputs using BindingResult.rejectValue(). In this example, we will learn to build a more robust validator for EmployeeVO model object. This validator is custom implementation of Validator interface. In this example, I …

RESTEasy Bean Validation using Hibernate Validator Provider

The Bean Validation API (JSR-303) defines a meta-data model and API for bean validation based on annotations. The functionality is achieved through the resteasy-hibernatevalidator-provider component. In order to integrate, we need to add resteasy-hibernatevalidator-provider.jar and hibernate-validator.jar files to the classpath. If you are using maven the, you need to add …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.