Commit 39724519 authored by 郭勇志's avatar 郭勇志

判断后缀类型

parent 5ae75e12
...@@ -30,7 +30,7 @@ class DownTemplate extends Model ...@@ -30,7 +30,7 @@ class DownTemplate extends Model
} }
public function validateContain($attribute) public function validateContain($attribute)
{ {
if(!in_array($this->SUFFIX,['xls','xlsx','csv'])){ if(!in_array($this->SUFFIX,['Xls','Xlsx','Csv'])){
$this->addError($attribute, '不支持的后缀.'); $this->addError($attribute, '不支持的后缀.');
} }
} }
......
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