Skip to content
Snippets Groups Projects
Commit 9df20902 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

feat: Ensure model is not run if validation fails

parent 3b6758b4
No related branches found
No related tags found
No related merge requests found
...@@ -362,9 +362,11 @@ ...@@ -362,9 +362,11 @@
} else if (selectedWeatherdataType === "weatherstation") { } else if (selectedWeatherdataType === "weatherstation") {
if(theForm["weatherStationId"].options[theForm["weatherStationId"].selectedIndex].value == "-1") { if(theForm["weatherStationId"].options[theForm["weatherStationId"].selectedIndex].value == "-1") {
alert("Mangler værstasjon") alert("Mangler værstasjon")
return false;
} }
} else { } else {
alert("Mangler type værdatakilde") alert("Mangler type værdatakilde")
return false;
} }
// Observation: Either no fields or all fields must be set // Observation: Either no fields or all fields must be set
......
...@@ -430,6 +430,7 @@ ...@@ -430,6 +430,7 @@
} }
} else { } else {
alert("Mangler type værdatakilde") alert("Mangler type værdatakilde")
return false;
} }
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment