Added validation handler. Still needs a way to return a result.