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
https://forums.phpfreaks.com/topic/227845-validating-help/
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 "[email protected]" ;)

Link to comment
https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1174990
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
https://forums.phpfreaks.com/topic/227845-validating-help/#findComment-1175275
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.