diff --git a/framework/yii/validators/SafeValidator.php b/framework/yii/validators/SafeValidator.php new file mode 100644 index 0000000..25da899 --- /dev/null +++ b/framework/yii/validators/SafeValidator.php @@ -0,0 +1,24 @@ + + * @since 2.0 + */ +class SafeValidator extends Validator +{ + /** + * @inheritdoc + */ + public function validateAttribute($object, $attribute) + { + } +} diff --git a/framework/yii/validators/Validator.php b/framework/yii/validators/Validator.php index 9853c42..ec9afc4 100644 --- a/framework/yii/validators/Validator.php +++ b/framework/yii/validators/Validator.php @@ -35,6 +35,7 @@ use yii\base\NotSupportedException; * - `integer`: [[NumberValidator]] * - `match`: [[RegularExpressionValidator]] * - `required`: [[RequiredValidator]] + * - `safe`: [[SafeValidator]] * - `string`: [[StringValidator]] * - `unique`: [[UniqueValidator]] * - `url`: [[UrlValidator]] @@ -66,6 +67,7 @@ abstract class Validator extends Component 'match' => 'yii\validators\RegularExpressionValidator', 'number' => 'yii\validators\NumberValidator', 'required' => 'yii\validators\RequiredValidator', + 'safe' => 'yii\validators\SafeValidator', 'string' => 'yii\validators\StringValidator', 'unique' => 'yii\validators\UniqueValidator', 'url' => 'yii\validators\UrlValidator',