Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

springboot validator manually validate

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

        if(!violations.isEmpty()) {
            throw new ConstraintViolationException(violations);
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #springboot #validator #manually #validate
ADD COMMENT
Topic
Name
9+3 =