mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-14 03:56:53 +01:00
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:
@@ -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'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user