{"size": 1273, "ext": "js", "max_stars_repo_path": "js/login.js", "max_stars_repo_name": "kurian1999/Kevent", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/login.js", "max_issues_repo_name": "kurian1999/Kevent", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/login.js", "max_forks_repo_name": "kurian1999/Kevent", "max_forks_repo_forks_event_min_datetime": "2021-11-14T11:23:00.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-14T11:23:00.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 31.825, "max_line_length": 61, "alphanum_fraction": 0.6300078555}
const email = document.querySelector("#e_mail");
const pass = document.querySelector("#pass-word")

// error message
const emailError = document.querySelector(".email .error");
const passError = document.querySelector(".password .error");
var emailSubmit = false;
var passsubmit = false;

// //Email Validation
email.addEventListener("input", () => {
    if (email.value == "") {
        emailError.classList.add("error-visible");
        emailError.classList.remove("error-hidden");
        emailError.innerText = "Field cannot be blank";
        emailSubmit = false;
    }
    else if (email.value != "") {
        emailError.classList.remove("error-visible");
        emailError.classList.add("error-hidden");
        emailError.innerText = "";
        emailSubmit = true;
    }
});

//password validation
pass.addEventListener("input", () => {
    if (pass.value == "") {
        passError.classList.add("error-visible");
        passError.classList.remove("error-hidden");
        passError.innerText = "Field cannot be blank";
        passsubmit = false;
    }
    else if (pass.value !== "") {
        passError.classList.remove("error-visible");
        passError.classList.add("error-hidden");
        passError.innerText = "";
        passsubmit = true;
    }
});