Artemis has support to use Bean Validation (BV), which supports a plugin that, basically, listens an event from preEntity and executes the BV. The artemis-validation has the support for BV, but does not implement it, thus, is necessary to add either the API and an implementation of BV in the project.
In case of a validation problem in the project, a ConstraintViolationException will be thrown.
Person person =Person.builder().withAge(10).withName("Ada").withSalary(BigDecimal.ONE).withPhones(singletonList("123131231")).build();repository.save(person);//throws a ConstraintViolationException