Re: validate URL
| From: | Jeroen Houben | Date: | Thu, 04 Dec 2003 18:34:52 +0000 |
| Subject: | Re: validate URL | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24155@lists.php.net to get a copy of this message | ||
Stefan Neufeind wrote:
On 4 Dec 2003 at 9:29, Paul M Jones wrote:$validate->url('mms://www.yahoo.com/stream.wma'); // true $validate->url('mms://www.yahoo.com/stream.wma', array('http','https')); // false Just my 2cents. JeroenOn Dec 4, 2003, at 9:22 AM, Arnaud Limbourg wrote: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. I would say that you if you pass an array with valid protocols it should limit the possibilities, but by default it should allow everything: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?