A
A
Andrew2019-10-08 20:40:37
npm
Andrew, 2019-10-08 20:40:37

How to use email validator?

I installed email-validator ( https://www.npmjs.com/package/email-validator) in the project and don't quite understand how to use it. By adding this code

var validator = require("email-validator"); 
validator.validate("[email protected]"); // true

gives an error message .
Structure:
5d9cc9eadca32305727337.png
Validator installed in the root of the project.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Neverov, 2019-10-08
@TTATPuOT

The problem is in your application or structure. It's impossible to tell for sure without the text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question