Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. mail id validation

mail id validation

Scheduled Pinned Locked Moved ASP.NET
javatoolsregexhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sudharsong
    wrote on last edited by
    #1

    hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa

    P R 2 Replies Last reply
    0
    • S sudharsong

      hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Can you not just alter your regex to perform the check you are currently using for your e-mail string and then whatever separator character you are using being present many times in the string?

      1 Reply Last reply
      0
      • S sudharsong

        hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa

        R Offline
        R Offline
        R Prabha Devi
        wrote on last edited by
        #3

        Hi, Below is the javascript code for E-Mail validation, //Check for Proper Email Id //For this function Email id has to be passed function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at,(lat+1))!=-1) { alert("Please enter a valid E-mail id.") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot,(lat+2))==-1) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(" ")!=-1) { alert("Please enter a valid E-mail id.") return false } return true } Note: For multiple email ids u can split the email ids and send one by one to check. Hope this will hepl u...:)

        S 1 Reply Last reply
        0
        • R R Prabha Devi

          Hi, Below is the javascript code for E-Mail validation, //Check for Proper Email Id //For this function Email id has to be passed function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at,(lat+1))!=-1) { alert("Please enter a valid E-mail id.") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot,(lat+2))==-1) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(" ")!=-1) { alert("Please enter a valid E-mail id.") return false } return true } Note: For multiple email ids u can split the email ids and send one by one to check. Hope this will hepl u...:)

          S Offline
          S Offline
          sudharsong
          wrote on last edited by
          #4

          thank u all ,it is helping me a lot.it;s working with regards, susa

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups