Answers for "springboot validator manually validate"

0

springboot validator manually validate

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

        if(!violations.isEmpty()) {
            throw new ConstraintViolationException(violations);
        }
Posted by: Guest on June-04-2021

Browse Popular Code Answers by Language