Last active
November 16, 2018 18:56
-
-
Save BumpeiShimada/51063473d053144031f0ed0896a3c472 to your computer and use it in GitHub Desktop.
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
@Service | |
@AllArgsConstructor(onConstructor = @__(@Autowired)) | |
public class ValidationService { | |
private ValidatorFactory factory; | |
public void execute(boolean isExclusive, EventForm form, List<String> errors) { | |
List<BaseValidator> validators = factory.get(isExclusive); | |
validators.forEach(validator -> { | |
validator.validate(form, errors); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment