Format validation errors and flashes