Merge pull request #2354 branch '2343-required-validator-trim' of https://github.com/AnatolyRugalev/yii into AnatolyRugalev-2343-required-validator-trim

* '2343-required-validator-trim' of https://github.com/AnatolyRugalev/yii:
  changed changelog line
  Added @since for $trim property
  Modified changelog line
  Added changelog line
  Added CRequiredValidator test case for $trim => true
  Added CRequiredValidator test
  Added $trim property to CRequiredValidator

Conflicts:
	tests/framework/validators/ValidatorTestModel.php
This commit is contained in:
Carsten Brandt
2013-04-17 19:17:08 +02:00
4 changed files with 49 additions and 2 deletions

View File

@@ -11,6 +11,9 @@ class ValidatorTestModel extends CFormModel
public $number;
public $username;
public $address;
public function rules()
{
return array(
@@ -26,6 +29,9 @@ class ValidatorTestModel extends CFormModel
array('url', 'url', 'allowEmpty'=>false, 'on'=>'CUrlValidatorTest'),
array('number', 'numerical', 'min'=>5, 'max'=>15, 'integerOnly'=>true, 'on'=>'CNumberValidatorTest'),
array('username', 'required', 'trim' => false, 'on' => 'CRequiredValidatorTest'),
array('address', 'required', 'on' => 'CRequiredValidatorTest'),
);
}
}