Jump to content

Validating help!


takn25

Recommended Posts

Hi, I have a user system where people login to my site with their emails. The thing I am after is when a person is registering I want to validate that they have entered a valid email with @.com in the string and not just some repetitive characters e.g. wwwwwww. Could some one guide me what is the best way to check for a valid email and for repetive characters in any given field examle firstname. One last thing I would also like to check that a person only enters Alphabets for name and stuff.

Link to comment
Share on other sites

As far as I'm aware, there isn't a way to make sure an e-mail is valid. The closest solution would be to send them an e-mail that they need to respond to.

 

As silkfire mentioned, REGEX is probably what you're looking for. The resource I turn to for help with regular expressions is:

http://weblogtoolscollection.com/regex/regex.php

 

Just keep in mind, that if you use a REGEX solution, visitors can still submit e-mail addresses like "NotReal@BiteMe.com" ;)

Link to comment
Share on other sites

The closest solution would be to send them an e-mail that they need to respond to.

 

There, just to reiterate . . .

 

For reference, I said "closest" because you can still get around these solutions. You could for example create a tempory e-mail account, fill out the form, confirm the e-mail, and close the e-mail account. ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.