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