Help needed in email address validation !

Hi all,
I am developing a web page in which there is a text box and a submit buttion. User enters his email id and clicks the button. As soon as the button is clicked, the email- address validation should be done.
some thing like,
only one @ shold be there,
the address should terminate with .net, .com, .org.....
there should not be any special characters like / , ?, < > \ etc..;
It should be in JSP or JAVA Script
Can anyone help me ????
Regards
AShvini

function validateEmail(email) {
    // A very simple email validation checking.
    // you can add more complex email checking if it helps
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) {
        return false;
    if(splitted[1] != null ) {
        var regexp_user=/^\"?[\w-_\.\']*\"?$/;
        if(splitted[1].match(regexp_user) == null) {
                return false;
    if(splitted[2] != null) {
        var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
        if(splitted[2].match(regexp_domain) == null) {
            var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
            if(splitted[2].match(regexp_ip) == null) {
                    return false;
        }// if
        return true;
    return false;
}Here's one in JS. A little bit of modification could make it suited to your requirements!

Similar Messages

  • I have an I pad2, an iMac desktop and an I phone 5, how do I get them all to be bale to face time with each other, do I need different email addresses, use the phone number, or the sim number in the iPad ? Ay help gratefully received !!

    I have an I pad2, an iMac desktop(2012) and an I phone 5, how do I get them all to be able to face time with each other, do I need different email addresses, use the phone number, or the sim number in the iPad ? Any help gratefully received !!

    Graham,
    For the iPad, iMac you need to create verifyible e-mail addresses created with one of the providers such as Yahoo, Gmail,etc.  For the iphone you should use it's phone number, but an e-mail could be used for it too.  If you want to associate these e-mail addresses with a single ID, I'm including a link to give you info about how you can do that. Read it carefully, as it can be a bit confusing.
    http://support.apple.com/kb/HE68

  • EMail Address Validation - Shell Script

    Hi,
    I have a custom concurrent program (Shell Script Program). One of the input parameter is Email address.
    In my code, I need to validate email address format (Ex: [email protected])
    Can anyone paste the code snippet.
    I have tried with the below validation
    case $EMAIL_ID in
         *@?*.?*) echo "Email Address Validated.";;
         *) echo "Invalid Email Address. Please enter the correct format of email address and re-run the program";
    exit 1;;
    esac
    This validation is failing in this scenario xxx,[email protected] / xxx [email protected] (If user enters the email address with comma or a blank space. This validation is returning success message)
    Regards
    BS

    Please look up the syntax for this by typing
    man mailx
    on the shell command prompt.
    Please stop asking Unix specific questions in an Oracle forum. There are more than enough Unix forums on the Internet.
    Please refrain from asking further doc questions here.
    You are in gross violation of the 'Forums Etiquette' post.
    Sybrand Bakker
    Senior Oracle DBA

  • Email Address Validation in JavaScript?M

    Hi, everyone,
    I need to validate the email address in javascript.
    Does anyone has a COMPLETED solution?
    Any reply would be valuable.
    Thank you in advance.

    BalusC wrote:
    Modi wrote:
    you can validate email address using java file.
    Take a look here
    [http://www.devdaily.com/blog/post/java/java-email-address-validation-class|http://www.devdaily.com/blog/post/java/java-email-address-validation-class]
    This is written by a 10 year old child and this identifies [email protected] as valid. It is not.
    [http://www.devx.com/tips/Tip/28334|http://www.devx.com/tips/Tip/28334]
    This identifies [email protected] as valid. It is not.
    [http://java-servlet-jsp-web.blogspot.com/2009/06/best-url-and-email-validation-using.html|http://java-servlet-jsp-web.blogspot.com/2009/06/best-url-and-email-validation-using.html]
    This does not validate .museum tld's, nor email addresses with RFC822/5322 valid characters like ~, #, & and so on.
    With other words, come up with better suggestions, kid.
    >
    >you can validate email address using java file.
    Take a look here
    [http://www.devdaily.com/blog/post/java/java-email-address-validation-class|http://www.devdaily.com/blog/post/java/java-email-address-validation-class]
    This is written by a 10 year old child and this identifies [email protected] as valid. It is not.
    [http://www.devx.com/tips/Tip/28334|http://www.devx.com/tips/Tip/28334]
    This identifies [email protected] as valid. It is not.
    [http://java-servlet-jsp-web.blogspot.com/2009/06/best-url-and-email-validation-using.html|http://java-servlet-jsp-web.blogspot.com/2009/06/best-url-and-email-validation-using.html]
    This does not validate .museum tld's, nor email addresses with RFC822/5322 valid characters like ~, #, & and so on.
    With other words, come up with better suggestions, kid.
    Okey fine.
    Now see these links
    [https://glassfish.dev.java.net/source/browse/glassfish/mail/src/java/javax/mail/#dirlist|https://glassfish.dev.java.net/source/browse/glassfish/mail/src/java/javax/mail/#dirlist]
    [https://glassfish.dev.java.net/source/browse/glassfish/mail/src/java/javax/mail/internet/InternetAddress.java?rev=1.6&view=markup|https://glassfish.dev.java.net/source/browse/glassfish/mail/src/java/javax/mail/internet/InternetAddress.java?rev=1.6&view=markup]
    I guess u will get right answer from these links and code also whatever u wants to do.
    might be it will not completely useful but i think u will get some ideas.

  • Email address validation, is there a way to use Regex or other fuzzy searching?

    I would like to use PL/SQL for Email address validation, is there a way to use Regex (regular expressions) or some other fuzzy searching for that? Using % and _ wildcards only take you so far...
    I need something that will verify alphanumeric charectors (no ",'.:#@&*^ etc.) any ideas?
    Current code:
    if email not like '_%@_%.__%' or email like '%@%@%' or email like '% %' or email like '%"%' or email like '%''%' or email like '%
    %' then
    The last line is to make sure there are no linebreaks in the middle of the email address, is there a better way to signify a line break, like \n or an ascii equivilent?

    Michael:
    The as noted in the previous post, DBI is a Perl package that allows Perl to talk to various databases, including Oracle. We use DBI on several UNIX servers, and it does not require ODBC, and I have always found it to be extremely quick. Things may be different in the Windows world.
    If you are spooling files out to run through Perl anyway, you may want to take a look at DBI. You could probably modify your existing scripts to use DBI fairly easily. The basic structure using DBI is like:
    use DBI;
    my dbh;       # A database handle
    my sth;       # A statment handle
    my sqlstr;    # SQL statement
    my db_vars;   # Variables for your db columns
    # Connect to the database
    $dbh = DBI->connect( "dbi:Oracle:service_name","user/password");
    $sqlstr = 'SELECT * FROM emp WHERE id = ?' # even takes bind variables
    #Prepare statement
    $sth = $dbh->prepare($sqlstr);
    $sth->execute(12345);  # Execute with values for bind if desired
    # Walk the "cursor"
    while (($db_vars) = $sth->fetchrow_array()) {
       your processing here

  • When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    Me too. I try to verify and i get the same message.
    I've created 3 alternate e-mail addresses and tried creating new accounts.
    Same Result!
    This is bullsh!t. How the **** can all 4 of my attempts result in the same freakin error???

  • Need my Email Address Switched for This Forum-Been Trying for a Week

    Need my Email Address Switched for This Forum-Been Trying for a Week.
    Can an Administrator PM me and switch it?
                thank you!

    See post here for more information, but this is officially resolved!
    As of 09/29/09, you can now change your email address for the forum via My Settings even if you have a community-only id. Many thanks to the mods for this update!
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

  • I need an email address for apple support of customer services

    I need an email address for customer support or customer services please...

    Find your country on this page and have a go....
    http://support.apple.com/kb/HE57

  • Email address validation pattern

    First off, I'm using JDK 1.4.2_07. What I'm trying to do is validate email addresses with the String.matches(String pattern) function. What I'm having a problem with is coming up with the regex pattern that represents any syntactically valid email address. If someone has a regex pattern that does represent any syntactically valid email address, I would appreciate it if you posted it in a reply to this message. Thanks!
    --Ioeth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Here is the struts implementation of email address validation:
    <validator name="email"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateEmail"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.email">
    <javascript><![CDATA[
    function validateEmail(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oEmail = new email();
    for (x in oEmail) {
    if ((form[oEmail[x][0]].type == 'text' ||
    form[oEmail[x][0]].type == 'textarea') &&
    (form[oEmail[x][0]].value.length > 0)) {
    if (!checkEmail(form[oEmail[x][0]].value)) {
    if (i == 0) {
    focusField = form[oEmail[x][0]];
    fields[i++] = oEmail[x][1];
    bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    * Reference: Sandeep V. Tamhankar ([email protected]),
    * http://javascript.internet.com
    function checkEmail(emailStr) {
    if (emailStr.length == 0) {
    return true;
    var emailPat=/^(.+)@(.+)$/;
    var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
    var validChars="\[^\\s" + specialChars + "\]";
    var quotedUser="(\"[^\"]*\")";
    var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
    var atom=validChars + '+';
    var word="(" + atom + "|" + quotedUser + ")";
    var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
    var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
    var matchArray=emailStr.match(emailPat);
    if (matchArray == null) {
    return false;
    var user=matchArray[1];
    var domain=matchArray[2];
    if (user.match(userPat) == null) {
    return false;
    var IPArray = domain.match(ipDomainPat);
    if (IPArray != null) {
    for (var i = 1; i <= 4; i++) {
    if (IPArray[i] > 255) {
    return false;
    return true;
    var domainArray=domain.match(domainPat);
    if (domainArray == null) {
    return false;
    var atomPat=new RegExp(atom,"g");
    var domArr=domain.match(atomPat);
    var len=domArr.length;
    if ((domArr[domArr.length-1].length < 2) ||
    (domArr[domArr.length-1].length > 3)) {
    return false;
    if (len < 2) {
    return false;
    return true;
    }]]>
    </javascript>
    </validator>

  • BP Email Address validation

    Hi,
    Is there anyway to turn off email address validation which occurs when creating Business partner.
    For example, abc.com@acb is an invalid email id and the system doesnt allow to save BP. But i want to save the BP even though email id is invalid.
    Thanks,
    Karthik.

    Hi Kartik,
    Only way to remove validation is to change the standard code.Go to program LSZA0F33 and comment FM
    SX_INTERNET_ADDRESS_TO_NORMAL.Please refer the below mentioned code.
    *{   DELETE         PDCK902820                                        1
    *\  CALL FUNCTION 'SX_INTERNET_ADDRESS_TO_NORMAL'
    *\       EXPORTING
    *\            address_unstruct    = unstruct
    \           COMPLETE_ADDRESS    = 'X'
    *\       IMPORTING
    *\            address_normal      = normal
    \           local               =
    \           domain              =
    \           COMMENT             =
    \            addr_normal_no_up_with_comment                   "1280i
    \                                = normal_w_umlaut            "1280i
    *\       EXCEPTIONS
    *\            error_address_type  = 1
    *\            error_address       = 2
    *\            error_group_address = 3
    *\            OTHERS              = 4.
    *\  IF sy-subrc <> 0.
    \550i+
    *\    error_table-msg_id     = sy-msgid.
    *\    error_table-msg_type   = sy-msgty.
    *\    error_table-msg_number = sy-msgno.
    *\    error_table-msg_var1   = sy-msgv1.
    *\    error_table-msg_var2   = sy-msgv2.
    *\    error_table-msg_var3   = sy-msgv3.
    *\    error_table-msg_var4   = sy-msgv4.
    \    error_table-fieldname  = 'SMTP_ADDR'.                   "863i
    *\    APPEND error_table.
    \    worst_error = c_error_occurred.                         "863u
    *\    IF g_check_address IS INITIAL.
    \      error_table-msg_type = c_warning_occurred.            "863u
    *\      MODIFY error_table
    \      TRANSPORTING msg_type  WHERE msg_type = c_error_occurred."863u
    \      worst_error = c_warning_occurred.                     "863u
    *\      help_smtp = smtp-smtp_addr.
    *\      TRANSLATE help_smtp TO UPPER CASE.                 "#EC TRANSLANG
    *\      CONDENSE help_smtp.
    *\      p_wa_adr6-smtp_srch = help_smtp.
    *\    ENDIF.
    *\    returncode = worst_error.
    \550i-
    *\  ELSE.
    *\    TRANSLATE normal TO UPPER CASE.                      "#EC TRANSLANG
    *\    p_wa_adr6-smtp_srch = normal-address.
    \    p_wa_adr6-smtp_addr = normal_w_umlaut-address.          "1280i
    *\  ENDIF.
    *}   DELETE
    *{   INSERT         PDCK902820                                        2
    Code inserted
        p_wa_adr6-smtp_srch = unstruct-address.
        p_wa_adr6-smtp_addr = unstruct-address.

  • Email address validation  -- Help plz

    I'm trying to validate set of email addresses from database and generate report on invalid email addresses
    I was able to validate if there is any syntax error in email address string.
    But I need to validate even the domain whether it exists or not.
    Can any one of you help me out in this regard.

    You're going to need to parse the address enough to extract the domain name.
    Then you can use the java.net.InetAddress class to see if that's a valid host name.
    But of course that still doesn't tell you if the email address is actually valid.
    See the JavaMail FAQ.

  • HELP! multiple email addresses, need to consolidate and forward all at once

    1. I have 2 email addresses and would like to have only one. I tried to cancel my old email account, but apparently it is still open
    2. If I do have 2 email accounts, I would like to cancel it and make sure that I'm not paying for 2 accounts
    3. In this process, I have tried forwarding all of my important emails from my old email to my new one, but I'm unable to select all of them at once and forward them together. Is there a way that I can forward all of them at the same time without having to go through the time consuming process of doing them one by one?
    Thanks,
    glb1968

    Can someone help me? I have a hundred or so emails to forward to me new address, and I really would like to avoid having to send them one by one. Does anyone know how to select all of them and send them at once?

  • Email address validation fails (IM for Nokia - Cha...

    I've installed 'IM for Nokia - Chat on the go' in my Nokia C6-01, i am unamle login using my gmail adderss that has a (.) dot in it. whereas its an valid email id. if you could fix this issue that will be great. Thanks.
    Moderator's Note: This post has been edited to remove the user's email address. For security reasons, we do not encourage posting of personal information in a public forum.

    IT would help if the people that are working this issue would post the resolve of their problems. Every post I see with this problem someone from oracle replies with needing the source project to replicate the issue and the thread dies....

  • Help please - An email address that I rarely used several years ago got reset to someone else's apple ID in place of the email account they used to create their account. How can this happen?

    A friend accused me of switching an email account that I used several years ago to send them photos on Flikr (gmail) for their Apple ID - in other words of.messing with their account. I only used the gmail account to post / send them and several other people photos on a few occasions and have not used the account since. I forgot that I had it. When this friend couldn't access their iTunes account the store discovered that the email had been reset to my very old gmail address. How is this possible? Now, they are accusing me of hacking in although no purchases were made and nothing was done with the account. Still, my reputation is at stake. Could they have done it in error? It looks bad for me. Help please.

    I made up the names edward and daniel, it's not actually anyone's email address, so no need for concern.
    In practice, I'm sure you're right that I would have fewer problems with a longer, more complex email address. But in principal, the problem remains. I could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678@gmail
    and someone else could sign up for the Apple ID
    1234.NoOneWillEverUseThisAddress.5678+1@gmail
    and apple would have no problem with it, even though for all intents and purposes it's the same email address. So the problem is not just the ambiguity of my, to use Dahveed's words, overly simplistic and unsophisticated, email address:
    there is a fundamental flaw in the way Apple links email addresses to accounts that allows for this ambiguity.  If they followed the same conventions that gmail did, there would be no possibility of this problem.

  • Need an email address for registration

    I just bought my Toshiba a few hours ago. I filled in all my details and laptop's s/n etc and they were validated. However, at the very end of the process I was asked to send via email (or fax) the invoice/receipt of my laptop to an email address in order to be registered. But I had a connection problem and I've lost the email address that the page told me to send the document.
    I searched everywhere and I didn't find the specific address (I clearly remember the words: @toshibaeurope or something like that). It was English based I think because it was also a phone number from England if I wanted to contact them.
    please help me.
    I appreciate it!

    Dear friend,
    thank you for your response! Fortunately I found the email and registered!
    Cheers

Maybe you are looking for

  • No updating of local currency in F-90

    Hi I am booking one fixed assets vendor in F-90. I entered USD in header detail and entered 44.60 rate in header details. I entered 100$ in vendor line item and in asset line item and pressed enter. Rs.4460 was populated in "Amount in local currency"

  • Lms 4.1 prime psirt/eox no data available in the report

     Hi: I´m running LMS 4.1 Prime for Windows. I tried an immediate report with PSIRT/EOX Report option: Cisco.com The job succeeded, but without any data in the report <TABLE style="WIDTH: 100%" border=0 cellSpacing=2 cellPadding=2 align=right mcestyle

  • Library sharing not working from all accounts

    I am using iTunes Library sharing from my iMac to enable access to mucis & movies on ios devices on my local network.  From my login on the iMac this works fine and the shared library appears on the "more" menu in the music app on my ipad whenever it

  • My sim card has fallen in to the iPhone 5c how can I get it out

    My SIM card has fallen in to my iPhone 5c what is best way to get it out?

  • VL10G Delivery Creation from Sales Order

    I am facing a problem where if I go to create delivery from VL10G, all the line items from the sales orders are transported to the delivery document EVEN when no stock is available? Can anyone help me out Thanks