jinaljoshi
jinaljoshi

Reputation: 31

Validation in spring boot rest controller

Is there any library available for validation similar in java similar to FluentValidation for .Net for rest controller data validation?

Upvotes: 1

Views: 702

Answers (2)

Rishikesh Dhokare
Rishikesh Dhokare

Reputation: 3589

The most widely used validation api with spring boot is - javax-validation-api - https://mvnrepository.com/artifact/javax.validation/validation-api/2.0.1.Final

Upvotes: 2

Adi
Adi

Reputation: 2394

You can use bean validation in spring-boot

https://reflectoring.io/bean-validation-with-spring-boot/

This is base on JSR303 where you can annotate Pojo fields with validation and values are validated in the controller layer before processing.

Upvotes: -1

Related Questions