Skip to content

Commit

Permalink
modified AppointmentTypeFormController so that it uses ValidateUtil t…
Browse files Browse the repository at this point in the history
…o fetch the actual AppointmentTypeValidator spring bean
  • Loading branch information
mogoodrich committed Mar 18, 2014
1 parent b4cc684 commit 7bb20e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.openmrs.api.context.Context;
import org.openmrs.module.appointmentscheduling.AppointmentType;
import org.openmrs.module.appointmentscheduling.api.AppointmentService;
import org.openmrs.module.appointmentscheduling.validator.AppointmentTypeValidator;
import org.openmrs.validator.ValidateUtil;
import org.openmrs.web.WebConstants;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Controller;
Expand Down Expand Up @@ -74,7 +74,7 @@ public String onSubmit(HttpServletRequest request, AppointmentType appointmentTy
AppointmentService appointmentService = Context.getService(AppointmentService.class);

if (request.getParameter("save") != null) {
new AppointmentTypeValidator().validate(appointmentType, result);
ValidateUtil.validate(appointmentType, result);
if (result.hasErrors()) {
return null;
} else {
Expand Down

0 comments on commit 7bb20e2

Please sign in to comment.