Pranav Pandey Pranav Pandey - 4 months ago 68
Node.js Question

Why is ToLowerCase() giving a type error in Express js / Node.js?

req.body.email.ToLowerCase() gives an error in Expressjs. Do we need to require something to use it?

Answer

If the email from the body is a string you can use the method toLowerCase();. You have a capital letter at the beginning.

Comments