Costum validator, not being executed when used in a form
i have created a costum validator but when i want to use it, it seems that it is never executed!

the validator :



    class sfTestUrlValidatorextends sfValidatorUrl {
    
        public function initialize($context, $parameters = null) {
            
            // Initialize parent
            parent::initialize($context);
        }
    
        public function execute(&$value, &$error) {
            
            
            if($value == "http://www.librosweb.es/")
            {
                //$error = "noooooooooooooo";
                return true;
            }
            
            else            return false;
            
        }
    
    }
    
in the configure method of a form, i do like that :

 

    public function configure() { 
     .....
    ....
     'url' => new sfTestUrlValidator(),  
Costum validator, not being executed when used in a form
===

i have created a costum validator but when i want to use it, it seems that it is never executed!

the validator :



    class sfTestUrlValidatorextends sfValidatorUrl {
    
        public function initialize($context, $parameters = null) {
            
            // Initialize parent
            parent::initialize($context);
        }
    
        public function execute(&$value, &$error) {
            
            
            if($value == "http://www.librosweb.es/")
            {
                //$error = "noooooooooooooo";
                return true;
            }
            
            else            return false;
            
        }
    
    }
    
in the configure method of a form, i do like that :

 

    public function configure() { 
     .....
    ....
     'url' => new sfTestUrlValidator(),  