You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Christoph Kutzinski <ku...@gmx.de> on 2004/08/27 11:44:13 UTC
UrlValidator
Hi,
someone asked this already before, but he got no answer:
Why is the UrlValidator saying that URLs without paths are invalid?
E.g.
urlValidator.isValid("http://www.heise.de";) returns false
but
urlValidator.isValid("http://www.heise.de/newsticker";) returns true
Is this a feature (and not and bug ;-)?
If it is so, why was it designed this way?
Additionally I would like to know:
Users often enter URLs without the http:// prefix.
I would like to allow them to enter URLs in the same way in my HTML
forms and validate it with UrlValidator.
Is it possible to tell the UrlValidator to ignore if there is an http://
prefix or not?
Thank you in advance,
Christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: UrlValidator
Posted by Martin Cooper <mf...@gmail.com>.
A quick look at the bug database would have answered your question:
http://issues.apache.org/bugzilla/show_bug.cgi?id=30686
--
Martin Cooper
On Fri, 27 Aug 2004 11:44:13 +0200, Christoph Kutzinski <ku...@gmx.de> wrote:
> Hi,
>
> someone asked this already before, but he got no answer:
>
> Why is the UrlValidator saying that URLs without paths are invalid?
> E.g.
>
> urlValidator.isValid("http://www.heise.de";) returns false
> but
> urlValidator.isValid("http://www.heise.de/newsticker";) returns true
>
> Is this a feature (and not and bug ;-)?
> If it is so, why was it designed this way?
>
> Additionally I would like to know:
> Users often enter URLs without the http:// prefix.
> I would like to allow them to enter URLs in the same way in my HTML
> forms and validate it with UrlValidator.
> Is it possible to tell the UrlValidator to ignore if there is an http://
> prefix or not?
>
> Thank you in advance,
>
> Christoph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org