How to validate the Email string

Hi all,
How do you validate for a valid email string under regular expressions?
Regards
David

Hi,
Create an validation on EMAIL item and select Regular Expression as a validation method.
Write the below coding in the regular expression validation method.
^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|co.in|in|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$
Regards,
Sakthi.
Edited by: Sakthi on Mar 18, 2011 2:22 AM
Edited by: Sakthi on Mar 18, 2011 2:28 AM

Similar Messages

  • How to validate the Email in JSF 2.0

    Hi,
    I am developing web application using jsf2.0.
    In this case, I wish to validate the email field with the help of import org.hibernate.validator.Email;
    But it is not working, How to validate the email fileld...
    Thank.

    ManiForum wrote:
    ...I wish to validate the email field with the help of import org.hibernate.validator.Email;
    But it is not working, How to validate the email fileld...Are you asking on how to do it with the Email class from Hibernate? Or, are you open to other alternatives?

  • How to validate the email

    Hi all
    i have a text input contains email
    while save the record i need to check the filed that is valid email or not
    at least one @ and .(dot) symbol should check
    how its posible
    Regards
    Sree

    Hi,
    There are lot of regular expressions available on net. You can choose as per your requirement.
    Following is an example which checks most of the email types.
    public boolean validateEmail(String email) {       
    String regEx = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";
    //Set the email pattern string
    Pattern p = Pattern.compile(regEx);
    //Match the given string with the pttern
    Matcher m = p.matcher(email);
    //check whether match is found
    boolean matchFound = m.matches();
    return matchFound;
    ~Mukesh U

  • How to validate the valid email

    Hi all
    i have a creation page in that page email field is ther .while saving the transaction i need to check that email is a valid email or not
    how can we achieve this functionality
    Regards
    Sreekanth

    Please see this link
    Re: how to validate the email
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How to Validate the Domain for a given email id. Is a valid or invalid

    Hello Frndz,
    I am trying to validate the domain of a given email as a valid or invalid using the below SQL Block. But the values are hard coded into it.
    Please suggest me some way to validate the email id Domain dynamically, so that it can be identify that the domain exsists or not.
    Please help me. Thanks in advance.
    DECLARE
    l_domain_pos VARCHAR2(50);
    l_at_pos VARCHAR2(50);
    BEGIN
    FOR DOMAIN_CHCK IN (SELECT * FROM s_cnct_test WHERE PROCESSED ='N')
    LOOP
    BEGIN
    l_at_pos :=substr(DOMAIN_CHCK.email_addr,instr(DOMAIN_CHCK.email_addr,'@'));
    l_domain_pos := SUBSTR(l_at_pos,INSTR(substr(DOMAIN_CHCK.EMAIL_ADDR,instr(DOMAIN_CHCK.EMAIL_ADDR,'@')),'.'));
    IF ((l_domain_pos ='.com') OR(l_domain_pos ='.net')OR (l_domain_pos ='.nic.in') OR(l_domain_pos ='.co.in')) THEN
    UPDATE S_CNCT_TEST SET
    DOMAIN_STATUS ='Y',
    PROCESSED = 'Y',
    NEW_COMMENT = 'VALID DOMAIN'
    WHERE ROW_ID = DOMAIN_CHCK.ROW_ID;
    ELSE
    UPDATE S_CNCT_TEST SET
    DOMAIN_STATUS ='X',
    PROCESSED = 'N',
    NEW_COMMENT = 'NOT A VALID DOMAIN'
    WHERE ROW_ID = DOMAIN_CHCK.ROW_ID;
    END IF;
    COMMIT;
    END;
    END LOOP;
    END;

    Hi,
    Try something like this
    SQL> create table s_cnct_test(id not null primary key
                            ,email_addr, domain_status,processed, new_comment)
    as
        select 1, '[email protected]', 'Z1', 'N', 'D1**************************' from dual union all
        select 2, '[email protected]', 'Z2', 'N', 'D2***************************' from dual union all
        select 3, '[email protected]', 'Z3', 'N', 'D3*************************' from dual
    Table created.
    SQL> create table valid_domain(domain varchar2(64) not null
                             ,constraint valid_domain_pk primary key (domain))
    Table created.
    SQL> insert into valid_domain(domain)
        values ('.com')
    1 row created.
    SQL> insert into valid_domain(domain)
        values ('.net')
    1 row created.
    SQL> insert into valid_domain(domain)
        values ('.nic.in')
    1 row created.
    SQL> insert into valid_domain(domain)
        values ('.co.in')
    1 row created.
    SQL> commit
    Commit complete.
    SQL> create function domain(pi_email_addr in s_cnct_test.email_addr%type)
       return varchar2
       deterministic
    as
    begin
       return substr(substr(pi_email_addr, instr(pi_email_addr, '@'))
                    ,instr(substr(pi_email_addr, instr(pi_email_addr, '@')), '.'));
    end domain;
    Function created.
    SQL> update s_cnct_test s
       set domain_status =
              nvl((select 'Y'
                     from valid_domain
                    where domain = domain(s.email_addr)), 'X')
          , processed = nvl((select 'Y'
                     from valid_domain
                    where domain = domain(s.email_addr)), 'N')
          , new_comment =  nvl((select 'VALID DOMAIN'
                     from valid_domain
                    where domain = domain(s.email_addr)), 'NOT A VALID DOMAIN')
    where processed = 'N'
    3 rows updated.
    SQL> commit
    Commit complete.
    SQL> select *from s_cnct_test
            ID EMAIL_ADDR     DO P NEW_COMMENT                 
             1 [email protected]  X  N NOT A VALID DOMAIN          
             2 [email protected]   Y  Y VALID DOMAIN                
             3 [email protected] Y  Y VALID DOMAIN                
    3 rows selected.Regards
    Peter

  • How to validate an email in jsp

    Hi everyone, I am developing an web application in which i had to validate a user entered email address. Actually i developed some part of the code in jsp but its not so perfect because when a user enters more than one @ symbol,i am not able to detect it. Also there are some more bugs in it. So can anyone give me a sample code for this validation of an email-id. Also i heard that we have to use some regular expressions for this.Is it true? if so how? i need an idea.

    Create an InternetAddress using the email string:
    import javax.mail.InternetAddress;
    InternetAddress email = new InternetAddress(emailString);or
    InternetAddress email = new InternetAddress(emailString, true);If the address is not RFC822 valid, you should get an AddressException. If you set the address using the InternetAddress.setAddress(String s) method, then call validate(), which wil throw an AddressException on an invalid address.

  • How to validate the file path when downloading.

    Hi
    How to validate the file path when downloading to Presentation or application Server.

    hiii
    you can validate file path by following way
    REPORT zvalidate.
    TYPE-POOLS: abap.
    DATA: w_direc TYPE string.
    DATA: w_bool TYPE abap_bool.
    w_dir = 'c:\Myfolder\'.
    CALL METHOD cl_gui_frontend_services=>directory_exist
    EXPORTING
    directory = w_direc
    RECEIVING
    result = w_bool
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    wrong_parameter = 3
    not_supported_by_gui = 4
    OTHERS = 5.
    IF NOT w_bool IS INITIAL.
    WRITE:/ 'Directory exists.'.
    ELSE.
    WRITE:/ 'Directory does not exist.'.
    ENDIF.
    regards
    twinkal

  • How to Validate Multiple email address in spry?

    How to validate multiple email address in spry framework?
    Spry validate text field can validate one email address only,
    if I the text field is for multiple emails, how can I validate
    it?

    Hello Jackson,
    The Spry Textfield was designed to work with the normal work
    flows that people currently use in most of the forms on the web. We
    tried to prevent any email injection method in the forms therefore
    the validation was designed to stop any multiple email insertion.
    In case you want to insert multiple emails you'll have to
    disable the default email validation and create your own validation
    function, more flexible. You can see a
    sample
    we did for the custom validation trying to validate a password
    strength and confirm the password.
    Cristian

  • Signature status for just submitting signature and yet to validate the email

    Hi,
    I need to get a specific signature status for just submitting signature and yet to validate the email. I need to restrict the user to submit my web form with out signing in the widget. So here, while submitting the form, Im fetching the signature status via ajax though API and based on the status the web form is restricted to submit.
    But using API, I could only able to get the complete signature status(submitting signature and validating email). Is it possible to get the status of only submission and yet to validate email ?
    Thank you,

    Hi Asmusz,
    Thanks for the reply.
    I created the widget with API createEmbeddedWidget and got documentKey in return from the result. Here is the result when I tried to get the status of the document from getDocumentInfo by passing documentKey:
    object(stdClass)#75 (1) {
      ["documentInfo"]=>
      object(stdClass)#76 (10) {
        ["events"]=>
        object(stdClass)#77 (1) {
          ["DocumentHistoryEvent"]=>
          object(stdClass)#78 (8) {
            ["type"]=>
            string(7) "CREATED"
            ["actingUserIpAddress"]=>
            string(13) "123.143.44.82"
            ["actingUserEmail"]=>
            string(27) "[email protected]"
            ["comment"]=>
            NULL
            ["participantEmail"]=>
            string(27) "[email protected]"
            ["date"]=>
            string(25) "2013-12-03T05:02:23-08:00"
            ["description"]=>
            string(31) "Document created by Naveen"
            ["documentVersionKey"]=>
            string(15) "X38BTTMN4D734M3"
        ["latestDocumentKey"]=>
        string(15) "X38BTTP3X7XKK4W"
        ["locale"]=>
        string(5) "en_US"
        ["message"]=>
        NULL
        ["name"]=>
        string(19) "[DEMO USE ONLY] ew9"
        ["nextParticipantInfos"]=>
        NULL
        ["documentKey"]=>
        string(15) "X389U3WXM663X76"
        ["securityOptions"]=>
        NULL
        ["participants"]=>
        object(stdClass)#79 (1) {
          ["ParticipantInfo"]=>
          object(stdClass)#80 (8) {
            ["roles"]=>
            object(stdClass)#81 (1) {
              ["ParticipantRole"]=>
              string(6) "SENDER"
            ["status"]=>
            string(6) "WIDGET"
            ["alternateParticipants"]=>
            NULL
            ["securityOptions"]=>
            NULL
            ["company"]=>
            string(20) "NaveenTechnology"
            ["email"]=>
            string(27) "[email protected]"
            ["name"]=>
            string(11) "Naveen"
            ["title"]=>
            string(13) "Sr. Developer"
        ["status"]=>
        string(6) "WIDGET"
    and the result is the same even If the document is signed in the widget and waiting for email validation. Not sure if im in a right path to get 'WAITING_FOR_VERIFICATION' status. Please clarify.
    Thank you,

  • How to validate the dates in the table control ?

    How to validate the dates in the table control ?
    Can I write like this ?
    LOOP AT it_tab .
    CHAIN.
    FIELD : it_tab-strtdat,it_tab-enddat.
    module date_validation.
    ENDCHAIN.
    ENDLOOP.
    Module Date_validation.
    ranges : vdat type sy-datum.
    vdat-sign = 'I'.
    VDAT-LOW = it_tab-STRTDAT.
    VDAT-HIGH = it_tab-ENDDAT.
    VDAT-OPTION = 'BT'.
    APPEND VDAT.
    WHAT CODE I have to write here to validate ?
    and If I write like this How can we know which is the current row being add ?
    It loops total internal table ..?
    Bye,
    Muttu.

    Hi,
    I think there is no need to put chain endchain.
    To do validation you have to write module in PAI which does required validations.
    Thanks
    DARSHAN PATEL

  • How to determine the connection string to a SQLite database, in C# code

    Hello. I'm trying to figure out how to specify the connection string to a SQLite database, I would like to access using the following code:
    string connectionString = null;
    SqlConnection connection;
    SqlCommand command;
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "Data Source=C:\\SQLITEDATABASES\\SQLITEDB1.sqlite;Version=3;";
    connection = new SqlConnection(connectionString);
    try
    connection.Open();
    command = new SqlCommand(sql, connection);
    catch
    The value I assigned to the variable connectionString, in the code above, I obtained somewhere from the Internet. It does not work. I'm using Visual Studio 2013, against the file sqlite-netFx451-setup-bundle-x86-2013-1.0.96.0.exe, which
    I installed, and got from
    here.
    My application's App.config file looks as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    </configSections>
    <connectionStrings>
    <add name="DC_Password_Saver.Properties.Settings.DC_Password_SaverConnectionString" connectionString="data source=&quot;C:\Users\patmo_000\Documents\Visual Studio 2013\Projects\DC Password Saver\DC Password Saver\DC Password Saver.db&quot;" providerName="System.Data.SQLite.EF6"/>
    </connectionStrings>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
    </startup>
    </configuration>
    I tried to use the value assigned to connectionString in the XML settings above, replacing single backslash characters with double backslash characters, because the Visual Studio editor flagged them as unrecognizable, and wound up with the
    following.
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "data source=&quot;C:\\Users\\patmo_000\\Documents\\Visual Studio 2013\\Projects\\DC Password Saver\\DC Password Saver\\DC Password Saver.db&quot;";
    connection = new SqlConnection(connectionString);
    The above code however does not work either. So again, does anyone know how I can specify in C# code, a connection string to access my SQLite database? Thanks in advance for your reply.

    What does SQLite connection strings has to do with WPF?
    You will find some valid connection strings here:
    https://www.connectionstrings.com/sqlite/
    But you cannot use the SqlConnection class to connect to a SQLite database. You will need to download and add a reference to the System.Data.SQLite library and then use the SQLiteConnection class:
    connection = new System.Data.SQLite.SQLiteConnection(connectionString);
    try
    connection.Open();
    command = new System.Data.SQLite.SQLiteCommand(sql, connection);
    catch
    Please refer to the following article for more information and an example of how to connect and read and write data from an SQLite database using C#:
    http://blog.tigrangasparian.com/2012/02/09/getting-started-with-sqlite-in-c-part-one/.
    There is contains a link where you can download the required assemblies.
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread in an approproate forum if you have a new question.

  • How to setup the email application for my gmail account in firefox os.. I need the configuration steps for gmail.

    I don't know how to setup the email account sync in firefox os.. can anyone explain the steps to be followed for setting up a gmail account...

    hello Dhanraj K, for gmail accounts there shouldn't be much manual configuration required. please try to set it up like described in [[Add an email account to the Mail app in Firefox OS]]

  • How to configure the email in SAP

    Hi Experts,
         Can you please let me know how to configure the email in the server?
    Thanks in Advance
    Regards,
    Kuldeep Verma

    Hello Indu Rayepudi ..
    I have followed the Recommendations and everything is going well but I can only send emails from the same domain, how can I set up to send to hotmail, gmail, yahoo?
    Mi sap es SAP ECC 6.0
    The administrator said that the Exchange server already has registered the server's ip sap to enable him to relay this IP.
    But nothing happens.
    Do you have any idea? any help from you, I would greatly appreciate .. Gina
    Here is the error: http://img.photobucket.com/albums/v484/mauzzz/SAP/SO01Erroringles-1.jpg
    Edited by: GCH on Sep 25, 2008 11:24 PM

  • How to send the email to different email addresses from Workflow

    Hello,
    i an not getting that how to send the email from Workflow in SAP.
    plz give the steps to do that.
    i have done lots of time but system is not sending the email to different email address.

    Hi,
    lot of configuration is invloved in sending
    mail to external email id. check BASIS to
    configure for external mails ans also check
    debug FM and see which conditions exceptions
    (Document not sendis raised)
    also check below code
    CLEAR: DOC_CHNG, OBJTXT, OBJBIN, OBJPACK, OBJHEAD, RECLIST,
    RECIPIENT_INT, DOC_SIZE,TAB_LINES.
    REFRESH: OBJTXT, OBJBIN, OBJPACK, OBJHEAD, RECLIST.
    OBJBIN[] = CONTENT_OUT[].
    Populate e-mail title
    DOC_CHNG-OBJ_NAME = 'MAIL'.
    CONCATENATE 'EETS for Contract #'(245)
    OIA01_TAB-EXGNUM
    INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    It is a text document
    CLEAR OBJPACK-TRANSF_BIN.
    The document needs no header (head_num = 0)
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    but it has a body
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    of type RAW
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    Create the attachment (the list itself)
    DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    It is binary document
    OBJPACK-TRANSF_BIN = 'X'.
    we need no header
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    but a body
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    of type PDF
    OBJPACK-DOC_TYPE = 'PDF'.
    OBJPACK-OBJ_NAME = 'Attachment'(239).
    CONCATENATE 'EETS_' OIA01_TAB-EXGNUM '_'
    IT_ZMMTACCUID-ACCTUSRID
    '_' SY-DATUM '_' SY-UZEIT '.PDF'
    INTO OBJPACK-OBJ_DESCR.
    READ TABLE OBJBIN INDEX TAB_LINES.
    DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
    OBJPACK-DOC_SIZE = DOC_SIZE.
    APPEND OBJPACK.
    Get e-mail address
    CLEAR IT_ADDRESS.
    READ TABLE IT_ADDRESS WITH KEY ACCTID = IT_ZMMTACCUID-ACCTUSRID
    BINARY SEARCH.
    IF SY-SUBRC = 0.
    RECIPIENT_INT-ADDRESS = IT_ADDRESS-SMTP_ADR.
    ENDIF.
    *Send email to external mail address
    RECLIST-RECEIVER = RECIPIENT_INT.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    CLEAR RECLIST.
    *Send email to SAP Office mail address
    RECLIST-RECEIVER = IT_ZMMTACCUID-ACCTUSRID.
    RECLIST-REC_TYPE = 'B'.
    APPEND RECLIST.
    CLEAR RECLIST.
    SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
    FOR SENDING DOCUMENTS WITH ATTACHMENTS
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
    document_data = doc_chng
    put_in_outbox = 'X'
    importing
    sent_to_all = sent_to_all
    tables
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist
    exceptions
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    others = 99.
    also check
    https:/Re: mail sending problem
    Regards
    amole

  • How to Validate the Cube in Essbase

    Hi All,
    in Essbase How to Validate the ASO Cube. How can we validate the data is loaded correctly or not after data loading.
    please let me know how to do this job?
    Regards

    If you load data you can see the data load successful and the no of cells updated in the dialogue box.
    If there any records rejected they are thrown into dataload .err file.
    If you want to validate the input data you can verify the input records in the excel add-in.
    If you want validate the business logic ( ie data at the high level ) you have to write SQL Procedures or Custom programs at the Source layer to calculate the high level data in ESSBASE and compare the results in essbase Roll UP Using Excel add-in.

Maybe you are looking for

  • Time machine disk erorr

    while running time machine under osx 10.5.1 , the disk gives error "disk disconnected" while in fact it is still there and never been moved or touched. !! there is an old backup dated a week ago on that external ( under 10.5) howver i had to reform a

  • ITunes wants to restore a working iPhone

    I connected my iPhone 3GS to my Macbook Pro tonight and instead of the usual sync info, iTunes told me "An iPhone has been previously synced with this computer. 1) Setup as new phone. 2) Restore from backup." The strange thing is the iPhone is workin

  • Losing Date Information Upon Import

    I have movie files in both iPhoto and on DVD that I can import into iMovie - but then said clips show up in Events as having been "Created" at the time of import - not the date/time the video clip was actually taken. The information is in the file to

  • Business partner Migration Strategy

    Dear All, We have one project on CRM migration of Business partners along with marketing attributes from 4.0 to 7.0 There are two approaches u2013 1.     Either the data is transferred from CRM 4.0 to CRM 7.0 2.     Data is transferred from ECC6.0 to

  • Video storage space

    I cannot record any more video on my iPhone 5 because I've run out of space. What can I do to resolve this?