My E-Mail Validation Script

The aim of this challenge is to write a computer program that asks the end-user to type their e-mail address. The program should decide whether the e-mail being entered is a valid one or not.

Some of the validation checks that your program should complete are as follows:

  • The email should contain one and only one “@” sign
  • The email should contain at least one “.” sign located after the “@” sign. However it may contains more than one “.” sign for emails ending in .co.uk for instance
  • The email cannot contain any space or “#” signs
  • The “@” sign cannot be in the first position and there should be at least 1 character between the “@” and the “.” sign.
  • The email cannot end with a “.” sign

Can you think of any other rules to make your validation script even more robust?

Learning Objectives

By Completing this challenge you are going to develop your string manipulation skills!

Let’s Get Started

Look at the following code used to find out if the email contains an “@” sign.

Comlete this code to implement all of the validation check mentionned above.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,