Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread ali
On Tue, 20 Jun 2006 13:07:37 +0430, Michiel Korthuis [EMAIL PROTECTED] wrote: i think \w = [_A-Za-z0-9] so instread of ^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)[EMAIL PROTECTED](\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,}){1}$) can tell ^\w+(\.\w+)[EMAIL PROTECTED]((\.\w+\.)+|\.)[a-z]{2,3}$

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Frank Bille Jensen
On Thu, 2006-06-22 at 06:47 +0200, jan_bar wrote: just in the case, do you take IDN (International Domain Names) into consideration? Allowed characters for .de domain are listed here: http://www.denic.de/en/domains/idns/liste.html. It's not me who have created the RFC 822 compliant regex. But

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread cowwoc
Instead of using some super long regex why not code the logic by hand (the old fashion way without regex). I find that often the resulting code is easier to read and in this case it might actually turn out to be shorter. Maybe :) Gili Frank Bille Jensen wrote: On Wed, 2006-06-21 at

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Eelco Hillenius
I don't think that code will be better readable. But I'm looking forward to what you think it should look like :) Eelco On 6/21/06, cowwoc [EMAIL PROTECTED] wrote: Instead of using some super long regex why not code the logic by hand (the old fashion way without regex). I find that

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Michael Day
None of these regexp are perfect, by the way. Email addresses are not allowed to begin with hyphens and underscores =). Michael Day On Jun 22, 2006, at 1:40 AM, ali wrote: On Tue, 20 Jun 2006 13:07:37 +0430, Michiel Korthuis [EMAIL PROTECTED] wrote: i think \w = [_A-Za-z0-9] so

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Igor Vaynberg
patch merged-IgorOn 6/21/06, Frank Bille Jensen [EMAIL PROTECTED] wrote: On Thu, 2006-06-22 at 06:47 +0200, jan_bar wrote: just in the case, do you take IDN (International Domain Names) into consideration? Allowed characters for .de domain are listed here:

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Frank Bille Jensen
On Thu, 2006-06-22 at 11:25 -0400, Michael Day wrote: None of these regexp are perfect, by the way. Email addresses are not allowed to begin with hyphens and underscores =). According to whom ;-) At least in the RFC email addresses may start with _ and -. Regards Frank Bille Avaleo

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-22 Thread Michael Day
Hrm, you're right, but the short regexps mentioned so far are still not correct. According to RFC3696 (Application Techniques for Checking and Transformation of Names), the following are all valid email addresses. I think I'll go shoot myself now. [EMAIL PROTECTED] customer/[EMAIL

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote: i wonder how big the created state machine is for this beast :) It's quite big. I just tried to profile it and compare it to the regex, which Michael Korthuis provided. If I can calculate correctly it is over 100 times larger than Michaels

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Igor Vaynberg
heh, my vote is for michael's :) i merged it into 1.2 and 2.0 branches.what do you guys think? the big pattern is quiete a bit bigger and the way it works right now is every instance of email addr validator will create its own copy - maybe if we refactor that to keep the pattern as a singleton it

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Nick Heudecker
If people want the monster validator, they can write their own email address validator.On 6/21/06, Igor Vaynberg [EMAIL PROTECTED] wrote:heh, my vote is for michael's :) i merged it into 1.2 and 2.0 branches.what do you guys think? the big pattern is quiete a bit bigger and the way it works

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Michael Day
I only glanced quickly at the larger expression, but it seems to allow for quite a bit that you would NOT want. I think it's more geared toward mail servers. For example, I think it will evaluate the following as a valid email address (possibly with random tabs and spaces throughout):

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Igor Vaynberg
How about having a RfcCompliantEmailAddressPatternValidator living nextto the normal EmailAddressPatternValidator? Then developers would only pick the RFC compliant version if they actually needed it. Just athought.if you attach one to sf.net tracker or an email i will happily put it into

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Wed, 2006-06-21 at 12:23 -0700, Igor Vaynberg wrote: if you attach one to sf.net tracker or an email i will happily put it into extensions. Yeah, why not :) I'll brew something together when I have a spare moment. - fb All the advantages of Linux Managed Hosting--Without the Cost and

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread Frank Bille Jensen
On Wed, 2006-06-21 at 21:27 +0200, Frank Bille Jensen wrote: On Wed, 2006-06-21 at 12:23 -0700, Igor Vaynberg wrote: if you attach one to sf.net tracker or an email i will happily put it into extensions. Yeah, why not :) I'll brew something together when I have a spare moment. And

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-21 Thread jan_bar
Hi, just in the case, do you take IDN (International Domain Names) into consideration? Allowed characters for .de domain are listed here: http://www.denic.de/en/domains/idns/liste.html. http://www.mädchen.de (doesn't work but is registered) Jan All the advantages of Linux Managed

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-20 Thread Frank Bille Jensen
Thats right.. In our company we use the (crazy) regex pattern taken from http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html String emailPattern = (?:(?:\\r\\n)?[ \\t])*(?:(?:(?:[^()@,;:\\\.\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t] +

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-20 Thread Michiel Korthuis
I am currently working on my graduation(project) @ Topicus with another student (Ronald Hemmink). We are new to Wicket and before we saw the wicket-build-in validator we came up with our own _expression_:^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)[EMAIL PROTECTED](\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,}){1}$)

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-20 Thread Frank Bille Jensen
Yeah I know. The regex is really frightening to most people (my self included), but AFAIK it should actually be the only one which truly validates the full RFC; for what it's worth. Regards Frank Bille Avaleo On Tue, 2006-06-20 at 10:37 +0200, Michiel Korthuis wrote: I am currently working on

Re: [Wicket-user] wicket emailaddress validation incorrect

2006-06-20 Thread Igor Vaynberg
i wonder how big the created state machine is for this beast :)-IgorOn 6/20/06, Frank Bille Jensen [EMAIL PROTECTED] wrote:Thats right.. In our company we use the (crazy) regex pattern taken from http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.htmlString emailPattern = (?:(?:\\r\\n)?[