Commit ac493522 authored by Shakarim Sapa's avatar Shakarim Sapa

- Коррекция правил валидации

parent 20690497
...@@ -31,11 +31,11 @@ class AnalyticsSchoolLessonFile extends \yii\db\ActiveRecord ...@@ -31,11 +31,11 @@ class AnalyticsSchoolLessonFile extends \yii\db\ActiveRecord
public function rules() public function rules()
{ {
return [ return [
[['lesson_id', 'title', 'file'], 'required'], [['lesson_id', 'title'], 'required'],
[['lesson_id'], 'integer'], [['lesson_id'], 'integer'],
[['file'], 'string'], [['file'], 'string'],
[['title'], 'string', 'max' => 255], [['title'], 'string', 'max' => 255],
[['document'], 'file', 'extensions' => 'PDF, RAR, ZIP, DOC. XLS, PPT'], [['document'], 'file', 'extensions' => 'PDF, RAR, ZIP, DOC, XLS, PPT'],
[['lesson_id'], 'exist', 'skipOnError' => true, 'targetClass' => AnalyticsSchoolLesson::className(), 'targetAttribute' => ['lesson_id' => 'id']], [['lesson_id'], 'exist', 'skipOnError' => true, 'targetClass' => AnalyticsSchoolLesson::className(), 'targetAttribute' => ['lesson_id' => 'id']],
]; ];
} }
......
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