Results 1 to 6 of 6
Thread: Validation of Email
- 09-22-2010, 04:18 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 2
- Rep Power
- 0
Validation of Email
as a developer there are times when making an application, we see things that the user enter a field that must match the format specified.
like the middle of my current make Java web applications ..
I made a shoutbox which is required to be filled Comment Email to post.
For That I should be doing in the validation of the email put it, an email whether it really exists (Valid) or the Users simply compose an inclusion or other email ...
Well, how do I Perform Validation with Java programming language (because of this article as long as I find who was using other programming languages such as PHP and Visual Studio) ..
THANKS
- 09-23-2010, 06:58 AM #2
Member
- Join Date
- Sep 2010
- Posts
- 1
- Rep Power
- 0
which framework you are using for web application.
If it is struts it is straightforward, you can use form-bean validation using Struts validator framwork.
- 09-23-2010, 09:03 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Your validation cannot confirm whether an email address exists, it can only confirm that it conforms to a vague format.
And, really, the only thing you can do is ensure it has an '@' in the middle. There are several regexes out there, but I'm not convinced they actually work in all cases...at least everyone I've seen brought up at the old Sun forums seemed to have a problem with outliers. And since you can't confirm the address exists anyway I doubt it's worth going to all that trouble.
- 09-23-2010, 01:48 PM #4
Member
- Join Date
- Sep 2010
- Posts
- 2
- Rep Power
- 0
@Profes.vijay :sorry, i don't use any Framework.
@Tolls : "regex" do you mean is regex at package java.util.regex
how about reguler Expression, i hear that's answer of my problem. if yes,
you know source about that??
- 09-23-2010, 01:56 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Short for regular expression, yes.
I'm sure you can google email regex.
Essentially you just want to make sure that there's something alpha-numeric before the '@' and after it. Anything else is, IMO, overkill.
And, as I said, there is no way this will tell you if the address exists or not.
- 09-26-2010, 11:13 AM #6
Member
- Join Date
- Sep 2010
- Posts
- 12
- Rep Power
- 0
as you can found at top:
if you use j2se you can use Regular Expressions that you can find it here:
email validation,java : java
Similar Threads
-
Live Email Validation In Java
By shameel in forum Web FrameworksReplies: 9Last Post: 01-05-2010, 05:42 AM -
String Tokenizer - Basic email validation
By bobbyboyy in forum New To JavaReplies: 3Last Post: 11-01-2009, 04:44 PM -
VAlidation
By chetna1982 in forum New To JavaReplies: 2Last Post: 12-11-2008, 07:08 AM -
send email using apache commons email
By jnamendi in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-14-2008, 05:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks