So I've been trying to research online for solutions, and none of them seem to work either because I'm doing it wrong, or they don't work in my situation.
I have a webpage which gives the user a place to enter email/pass etc. When they press the submit, it calls a post function, which has all the validation contained within it. Like so:
app.post('/check', function(req, res){
function emailCheck(email){
//when theres an error: console.log(error), and return false
}
function passCheck(password){
//when theres an error: console.log(error), and return false
}
if (passCheck == true && emailCheck == true){
//enter user into database
}
}
When there is an error, I want it to be displayed to the user, either by use of popup box, or just text positioned under the sign up box.
Any suggestions would be great.