Improve division page validity check
parent
644c8fdec3
commit
000905257e
|
@ -48,6 +48,11 @@ async function checkDataValidity() {
|
||||||
|
|
||||||
if(!nameTextbox.value) dataIsValid = false;
|
if(!nameTextbox.value) dataIsValid = false;
|
||||||
|
|
||||||
|
const sportHasContent = sportDropdown.options.length;
|
||||||
|
const genderHasContent = genderDropdown.options.length;
|
||||||
|
|
||||||
|
if(!sportHasContent || !genderHasContent) dataIsValid = false;
|
||||||
|
|
||||||
|
|
||||||
if(dataIsValid) submitButton.disabled = false;
|
if(dataIsValid) submitButton.disabled = false;
|
||||||
else submitButton.disabled = true;
|
else submitButton.disabled = true;
|
||||||
|
|
Reference in New Issue