Development

Changeset 8322

You must first sign up to be able to contribute.

Changeset 8322

Show
Ignore:
Timestamp:
04/05/08 20:24:07 (1 year ago)
Author:
FabianLange
Message:

sfValidatorUrl will accept FTP urls by default as well. closes #3000

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/validator/sfValidatorUrl.class.php

    r6951 r8322  
    2727 
    2828    $this->setOption('pattern', '~^ 
    29       https?://                               # http or https 
     29      (https?|ftp)://                        # http or https or ftp  
    3030      ( 
    3131        ([a-z0-9-]+\.)+[a-z]{2,6}             # a domain name 
  • branches/1.1/test/unit/validator/sfValidatorUrlTest.php

    r6945 r8322  
    1111require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 
    1212 
    13 $t = new lime_test(12, new lime_output_color()); 
     13$t = new lime_test(13, new lime_output_color()); 
    1414 
    1515$v = new sfValidatorUrl(); 
     
    2424  'http://127.0.0.1/', 
    2525  'http://127.0.0.1:80/', 
     26  'ftp://google.com/foo.tgz',  
    2627) as $url) 
    2728{ 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.