From a470a86d6c878b65fa6b15265e6150fa451e3898 Mon Sep 17 00:00:00 2001 From: soyed Date: Wed, 10 Mar 2021 15:03:22 -0500 Subject: [PATCH] form validation --- css/styles.css | 10 +++++----- index.html | 7 +++---- scripts/index.js | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/css/styles.css b/css/styles.css index d93e493..47b42c3 100644 --- a/css/styles.css +++ b/css/styles.css @@ -72,10 +72,10 @@ p { } hr { - border: dotted #EAF6F6 6px; - border-bottom: none; - width: 20%; - /* margin: 100px auto; */ + border: dotted #EAF6F6 6px; + border-bottom: none; + width: 20%; + /* margin: 100px auto; */ } @@ -328,4 +328,4 @@ input[type=submit] { input[type=submit]:hover { background-color: #fa4664; -} +} \ No newline at end of file diff --git a/index.html b/index.html index 8b3112b..73d91c4 100644 --- a/index.html +++ b/index.html @@ -11,19 +11,18 @@ + + - - + - -
diff --git a/scripts/index.js b/scripts/index.js index 0018ed6..a14a512 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -32,5 +32,24 @@ function getAvailability(date) { //Form Validation function validateForm(){ //first check that the user has selected, + var serviceSelected = $('#selectService option:selected').val(); + console.log(optionSelected); + if (serviceSelected === "Select Service"){ + alert("*Please select a service"); + } + //next check for the technician selected by the users + var technicanSelected = $('#technicanSelected option:selected').val(); + console.log(technicanSelected); + if(technicanSelected === "Select technican"){ + alert("*Please select a technican") + } + + //next, check for appointment date selection + //next, check for appointment time selection + + // Account Section + //check for creditCard holder name + // check for credit card Format. + // check for t }