Bean Validation

Spring MVC Validation of Request Body and Parameters

Learn to validate the request body of a REST API built with Spring MVC. Also, validate @PathVariable and @RequestParam parameters in resource URIs using the hibernate validator framework. In this Spring MVC validation example, we will add validations in REST APIs created for the CRUD example. 1. Request Body Validation …

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.