Commit 509672cc authored by shajiaiming's avatar shajiaiming

fix

parent 0f3f5700
...@@ -52,8 +52,8 @@ class CoinIssueCoin extends CommonActiveRecord ...@@ -52,8 +52,8 @@ class CoinIssueCoin extends CommonActiveRecord
[['name', 'symbol', 'total', 'owner', 'introduction', 'category', 'type', 'platform_id', 'chain_id', 'charge_unit', 'charge', 'template'], 'required'], [['name', 'symbol', 'total', 'owner', 'introduction', 'category', 'type', 'platform_id', 'chain_id', 'charge_unit', 'charge', 'template'], 'required'],
[['total', 'category', 'type', 'platform_id', 'chain_id'], 'integer'], [['total', 'category', 'type', 'platform_id', 'chain_id'], 'integer'],
[['introduction', 'charge_unit'], 'string', 'length' => [1, 100]], [['introduction', 'charge_unit'], 'string', 'length' => [1, 100]],
['symbol', 'string', 'length' => [2, 8]], ['symbol', 'string', 'length' => [2, 16]],
['name', 'string', 'length' => [2, 64]], ['name', 'string', 'length' => [2, 128]],
['nickname', 'string', 'length' => [0, 10]], ['nickname', 'string', 'length' => [0, 10]],
[['token_type', 'nickname'], 'safe'], [['token_type', 'nickname'], 'safe'],
['template', 'verfiyTemplate'], ['template', 'verfiyTemplate'],
...@@ -135,8 +135,8 @@ class CoinIssueCoin extends CommonActiveRecord ...@@ -135,8 +135,8 @@ class CoinIssueCoin extends CommonActiveRecord
// } // }
// } // }
if (!preg_match('/^[a-zA-Z0-9]+$/u', $this->symbol)) { if (!preg_match('/^(?![0-9]+$)(?![A-Z]+$)[0-9A-Z]{2,16}$/', $this->symbol)) {
$this->addError($attribute, 'Token简称必须包含字母和数字'); $this->addError($attribute, 'Token简称必须为大写字符和数字');
return false; return false;
} }
......
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