Re: validate URL

From: Date: Thu, 04 Dec 2003 18:49:29 +0000
Subject: Re: validate URL
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24157@lists.php.net to get a copy of this message
Stefan Neufeind wrote:
On 4 Dec 2003 at 9:29, Paul M Jones wrote:
On Dec 4, 2003, at 9:22 AM, Arnaud Limbourg wrote:
Nope. it means valid values are http, https, ftp the ? is for 0 or 1 which matches http or https.
Which means that mailto:, news://, and gopher:// are not valid?
Mailto: itself is no URL since you won't have a // behind if you write it in a a-href-link. But for news and gopher you're right, yes. So maybe let's consider having an optional array as Pierre suggested. Mostly you just want to allow http, https and ftp I'm sure.
read RFC 2396 and 1738. mailto is valid per these rfc's. I beleive validate url should be compliant to the rfc's. And if an array of allowed schemes is desired by some people, it should be an option, not a default. I deal with all kinds of url's and working with code that expects me to know what I work with ahead of time is a pain. Making an assumption about what people do is not a good idea. Shane

« previous php.pear.dev (#24157) next »