Validate email in Javascript

Asked

Viewed 23,359 times

7

Good afternoon,

I have a question in an exercise that I have to solve and I wanted to ask you to help me:

As I do a function in Javascript that takes as argument a string and checks if an email is valid, ie if it contains @is an email. And the function returns a boolean. Thank you

  • You can use regular expressions to check if the received string is a valid email. Take a look at this link: Regexone He’ll give you a good foundation.

1 answer

5


  • Thank you very much!

  • 1

    For those who are trying to consult the source link, the current link is this.

  • it seems that the regular expression that the exclude variable is receiving is no longer valid

Browser other questions tagged

You are not signed in. Login or sign up in order to post.