Bean validation just for information

Hi,

  1. How to do bean validation without strong constraints, just for information ?
    Is it possible to use ValidationErrors without blocking user input or persistence ?

Validation errors handling seems not to be customizable in CUBA.

  1. How to load a custom Hibernate Validator Factory ?

Stef.

What are you trying to accomplish? Could you provide an example of what you’re trying to do? It will be easier for people to suggest a solution if a concrete example/goal is given.

We try to handle CUBA/Java bean validation errors without blocking persistence/user input.

We’ve found a solution in:

  • using a custom group (groups parameter of bean validation annotation)
  • extending an entity listener
  • call validation in beforeCommit event (CUBA bean validator with specific group in parameter)

Thank you for your interest ! :slight_smile:

1 Like