Skip to content
Snippets Groups Projects
Commit 1ab6b218 authored by Mitchell Moore's avatar Mitchell Moore
Browse files

make form submit only if valid

parent 7cf58dbd
No related branches found
No related tags found
1 merge request!2Feat update ui (pre react)
......@@ -3,12 +3,14 @@ function displayloading() {
}
function request_account() {
socket.emit('request account', {
username: document.getElementById("username").innerText,
fullname: document.getElementById("fullname").innerText,
reason: document.getElementById("reason").innerText,
email: document.getElementById("email").value
})
if (document.getElementById("signup").valid){
socket.emit('request account', {
username: document.getElementById("username").value,
fullname: document.getElementById("fullname").value,
email: document.getElementById("email").value,
reason: document.getElementById("reason").value
});
}
}
function refresh() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment