Modifies the controller for error checking on date