Skip to content

Commit

Permalink
エディタテンプレートででアイコン画像をアップロード時に画像以外のファイルをアップロードするとエラーメッセージを表示するようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Sep 22, 2018
1 parent 27ac0d0 commit 5f29513
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Baser/Model/EditorTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public function __construct($id = false, $table = null, $ds = null) {
parent::__construct($id, $table, $ds);
$this->validate = [
'name' => [
['rule' => ['notBlank'], 'message' => __d('baser', 'テンプレート名を入力してください。')]]
['rule' => ['notBlank'], 'message' => __d('baser', 'テンプレート名を入力してください。')]],
'image' => [
['rule' => ['fileExt', ['gif', 'jpg', 'jpeg', 'jpe', 'jfif', 'png']], 'message' => __d('baser', '許可されていないファイルです。')]]
];
}

Expand Down

0 comments on commit 5f29513

Please sign in to comment.