nodejs error
Archiviert 2 years ago
N
Berat
Verified
Hello friends, I am developing a site with a nodejs project and I want it to check the username. It does this successfully, but it cannot find the id in my .ejs extension file and does not show me a dynamic error message.
Code:
const existingUser = await User.findOne({
$or: [
{ kullaniciAdi },
{ telefon },
{ email },
{ tcKimlik },
]
});
if (existingUser) {
// Eğer hata varsa, hata mesajını içeren bir HTML yanıtı gönderin
return res.status(400).send("hatamesaji");
}
What I want is to show an error message next to the input in my .ejs extension file instead of the error message here. I want the error message to go away when the user deletes it, such as "the username has already been taken", how can I do it?
