Validate Your Microservices With MicroProfile and Bean Validation

Can someone validate these for me?

Is a common code practice in our microservices to have a lot of If’s blocks to validate if some values are null, or if they have the right size, the dates are correct, etc. then the developer needs to inform the user that something went wrong and 50% of our code are those validations.

Fortunately, within the JavaEE/JakartaEE API’s there is Bean Validation that allows the developer to reduce all of that validation code in a declarative way using annotations and can be used along with MicroProfile to write better microservices that not only informs the users that something went wrong but also let them know how to fix it.