Commit bdd16379 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлен валидатор файлов

parent cd69015a
......@@ -16,6 +16,7 @@ use Yii;
*/
class AnalyticsSchoolLessonFile extends \yii\db\ActiveRecord
{
public $document;
/**
* @inheritdoc
*/
......@@ -34,6 +35,7 @@ class AnalyticsSchoolLessonFile extends \yii\db\ActiveRecord
[['lesson_id'], 'integer'],
[['file'], 'string'],
[['title'], 'string', 'max' => 255],
[['document'], 'file', 'extensions' => 'PDF, RAR, ZIP, DOC. XLS, PPT'],
[['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