Re: GenericValidator isEmail problem

On 9 Jul 2003 08:32:58 -0700, (Jarrett Grantham)
wrote or quoted :
>I'm using the GenericValidator.isEmail method to validator an email.
>I want to not allow spaces in the domain of an email; however, the
>isEmail method allows spaces in the domain.

Bone up on Regex patterns. I validate Email addresses with a page of
code like this:

/**
* Validate syntax of email addresses.
* Does not probe to see if mailserver exists in DNS or online.
* See MailProber for that.
* See ValidateEmailFile for an example of how to use this class.
*
* @author Roedy Green, Canadian Mind Products
* @version 1.0
* to do: check validity of & in first part of email address. Appears
in practice.
*/
public class EmailSyntaxValidator
{
private static boolean debugging = false;

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!