Commit 2b49143a authored by shajiaiming's avatar shajiaiming

fix

parent 70ad69a7
...@@ -60,7 +60,7 @@ class IssueCoinController extends BaseController ...@@ -60,7 +60,7 @@ class IssueCoinController extends BaseController
$result = [ $result = [
'name' => isset($result['name']) ? $result['name'] : '', 'name' => isset($result['name']) ? $result['name'] : '',
'symbol' => isset($result['symbol']) ? strtoupper($result['symbol']) : '', 'symbol' => isset($result['symbol']) ? $result['symbol'] : '',
'total' => isset($result['total']) ? $result['total'] : '', 'total' => isset($result['total']) ? $result['total'] : '',
'owner' => isset($result['owner']) ? $result['owner'] : '', 'owner' => isset($result['owner']) ? $result['owner'] : '',
'introduction' => isset($result['introduction']) ? $result['introduction'] : '', 'introduction' => isset($result['introduction']) ? $result['introduction'] : '',
......
...@@ -84,6 +84,11 @@ class CoinIssueCoin extends CommonActiveRecord ...@@ -84,6 +84,11 @@ class CoinIssueCoin extends CommonActiveRecord
public function verfiySymbol($attribute, $params) public function verfiySymbol($attribute, $params)
{ {
if (!preg_match('/^[A-Z]+$/', $this->symbol)) {
$this->addError($attribute, '名称必须大写');
return false;
}
if (CoinIssueCoin::TYPE_YES == $this->type) { if (CoinIssueCoin::TYPE_YES == $this->type) {
return true; return true;
} }
......
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