Moved ajax validation to app controller.