Added filter for validating requests before they reach the controller.