class GenericQuestionApplicationFormValidator {

    private void validateMultipleChoiceOptions(GenericQuestionApplicationForm form, BindingResult bindingResult) {
        if (form.isMultipleChoiceOptionsActive() && form.getMultipleChoiceOptionId() == null) {
            bindingResult.rejectValue("multipleChoiceOptionId", "validation.multiple.choice.required");
        }
    }

}