Updated validation for the project column

This commit is contained in:
iIronside 2023-10-13 15:52:39 +03:00
parent b004f6e21b
commit 1c3eeb4cf3

View File

@ -65,6 +65,7 @@ class ProjectColumn extends \yii\db\ActiveRecord
return [
[['title', 'project_id'], 'required'],
[['project_id', 'status', 'priority'], 'integer'],
[['project_id', 'title'], 'unique', 'targetAttribute' => ['project_id', 'title']],
[['created_at', 'updated_at'], 'safe'],
[['title'], 'string', 'max' => 255],
[['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']],