Commit 82cca8c1 authored by andre's avatar andre

CoContent - проверка уникальности url + catrgory_id

parent def914f3
...@@ -125,7 +125,7 @@ class CoContent extends \common\components\ActiveRecordModel ...@@ -125,7 +125,7 @@ class CoContent extends \common\components\ActiveRecordModel
[['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif'], [['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif'],
[['url', 'type', 'priority'], 'required'], [['url', 'type', 'priority'], 'required'],
[['url'], 'string', 'max' => 250], [['url'], 'string', 'max' => 250],
[['url'], 'unique'], [['url'], 'unique', 'targetAttribute' => ['url', 'category_id']],
[['category_id', 'custom'], 'safe'], [['category_id', 'custom'], 'safe'],
]; ];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment