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. e-mail validation

e-mail validation

Scheduled Pinned Locked Moved Web Development
questionalgorithms
3 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.
  • H Offline
    H Offline
    hande54
    wrote on last edited by
    #1

    Hi! How can I check the validation of the email by searching '@' character inside of document.getElementById('email').value or does anybody have better idea?

    J T 2 Replies Last reply
    0
    • H hande54

      Hi! How can I check the validation of the email by searching '@' character inside of document.getElementById('email').value or does anybody have better idea?

      J Offline
      J Offline
      JHizzle
      wrote on last edited by
      #2

      I've come at this from a .NET approach so it'd just be a regular expression validator control with the expression: "^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$" There's quite a few at regexlib.com if that doesn't match what you want, judging by your original question, I'm assuming you might just be working solely in javascript in which case, same expression should work with the javascript regular expression object but it's not one I've used.

      1 Reply Last reply
      0
      • H hande54

        Hi! How can I check the validation of the email by searching '@' character inside of document.getElementById('email').value or does anybody have better idea?

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        There are lots of things that have an @ that aren't valid e-mail addresses. Searching for javascript e-mail validation in Google gets 902000 results. The first one at http://www.smartwebby.com/dhtml/email_validation.asp[^] probably would work for you.

        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