Created
July 1, 2019 14:41
-
-
Save recursivecodes/ca05ffff4a7f3625495496c95656d829 to your computer and use it in GitHub Desktop.
UserRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Set<ConstraintViolation<User>> validate(User user) { | |
Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); | |
Set<ConstraintViolation<User>> constraintViolations = validator.validate(user); | |
return constraintViolations; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment