Validator Springboot Validasi secara manual

Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
        Set<ConstraintViolation<NotionalProviderPaymentDTO>> violations = validator.validate( notionalProviderPaymentDTO );

        if(!violations.isEmpty()) {
            throw new ConstraintViolationException(violations);
        }
Ugliest Unicorn