From c463c3a950246c4c2660ce7df1c1ea8f2acbe578 Mon Sep 17 00:00:00 2001 From: Zog Date: Wed, 31 Jan 2018 11:17:02 +0100 Subject: Refs #5750; Remove useless validation --- app/javascript/vehicle_journeys/actions/index.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js index b01158212..4a4ec371d 100644 --- a/app/javascript/vehicle_journeys/actions/index.js +++ b/app/javascript/vehicle_journeys/actions/index.js @@ -382,23 +382,8 @@ const actions = { }, validate : (dispatch, vehicleJourneys, next) => { - let valid = true - let vj, vjas - for (vj of vehicleJourneys){ - vj.errors = false - for(vjas of vj.vehicle_journey_at_stops){ - vjas.errors = null - if (vjas.area_kind == "non_commercial" && parseInt(vjas.departure_time.hour) == 0 && parseInt(vjas.departure_time.minute) == 0){ - vjas.errors = "Champ requis" - vj.errors = true - valid = false - } - } - } dispatch(actions.didValidateVehicleJourneys(vehicleJourneys)) - if(valid){ - actions.submitVehicleJourneys(dispatch, vehicleJourneys, next) - } + actions.submitVehicleJourneys(dispatch, vehicleJourneys, next) }, didValidateVehicleJourneys : (vehicleJourneys) => ({ -- cgit v1.2.3