Development

Changeset 11003

You must first sign up to be able to contribute.

Changeset 11003

Show
Ignore:
Timestamp:
08/20/08 18:39:20 (11 months ago)
Author:
fabien
Message:

[1.1, 1.2] fixed sfValidatorSchemaFilter not throwing an error bound to the filtered field (closes #4233)

Files:

Legend:

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

    r9048 r11003  
    5454    $value = isset($values[$this->getOption('field')]) ? $values[$this->getOption('field')] : null; 
    5555 
    56     $values[$this->getOption('field')] = $this->getOption('validator')->clean($value); 
     56    try 
     57    { 
     58      $values[$this->getOption('field')] = $this->getOption('validator')->clean($value); 
     59    } 
     60    catch (sfValidatorError $error) 
     61    { 
     62      throw new sfValidatorErrorSchema($this, array($this->getOption('field') => $error)); 
     63    } 
    5764 
    5865    return $values; 
  • branches/1.2/lib/validator/sfValidatorSchemaFilter.class.php

    r9048 r11003  
    5454    $value = isset($values[$this->getOption('field')]) ? $values[$this->getOption('field')] : null; 
    5555 
    56     $values[$this->getOption('field')] = $this->getOption('validator')->clean($value); 
     56    try 
     57    { 
     58      $values[$this->getOption('field')] = $this->getOption('validator')->clean($value); 
     59    } 
     60    catch (sfValidatorError $error) 
     61    { 
     62      throw new sfValidatorErrorSchema($this, array($this->getOption('field') => $error)); 
     63    } 
    5764 
    5865    return $values; 

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.