You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Duncan Lyall <ly...@yahoo.co.uk> on 2004/12/30 18:59:55 UTC
[commons-validator-1.1.4] I'm missing something.
Sorry about that last one .... I'll try again
I have the following code
String[] schemes = {"http","https"};
UrlValidator urlValidator = new UrlValidator(schemes);
String url = "http://www.foo.com";
if (urlValidator.isValid(url)) {
System.out.println("url is valid");
}
else {
System.out.println("url is invalid");
}
this FAILS validation
if I change the url to
http://www.foo.com/x it passes ?
I'm confused. What is wrong with http://www.foo.com ?
I've checked the wiki and the faq
Cheers
Duncan
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [commons-validator-1.1.4] I'm missing something.
Posted by Martin Cooper <mf...@gmail.com>.
This is a known bug. See:
http://issues.apache.org/bugzilla/show_bug.cgi?id=30686
--
Martin Cooper
On Thu, 30 Dec 2004 17:59:55 +0000 (GMT), Duncan Lyall
<ly...@yahoo.co.uk> wrote:
> Sorry about that last one .... I'll try again
>
> I have the following code
>
> String[] schemes = {"http","https"};
> UrlValidator urlValidator = new UrlValidator(schemes);
> String url = "http://www.foo.com";
> if (urlValidator.isValid(url)) {
> System.out.println("url is valid");
> }
> else {
> System.out.println("url is invalid");
> }
>
> this FAILS validation
>
> if I change the url to
> http://www.foo.com/x it passes ?
>
> I'm confused. What is wrong with http://www.foo.com ?
>
> I've checked the wiki and the faq
>
> Cheers
> Duncan
>
> ---------------------------------------------------------------------
> 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