Commit 4ed73736 authored by shajiaiming's avatar shajiaiming

fix

parent 8cb1008d
......@@ -50,7 +50,7 @@ class CoinIssueCoin extends CommonActiveRecord
[['name', 'symbol', 'total', 'owner', 'introduction', 'category', 'type', 'platform_id', 'chain_id', 'charge_unit', 'charge'], 'required'],
[['total', 'category', 'type', 'platform_id', 'chain_id'], 'integer'],
[['introduction', 'charge_unit'], 'string', 'length' => [1, 20]],
['symbol', 'string', 'length' => [1, 6]],
['symbol', 'string', 'length' => [6, 128]],
['name', 'string', 'length' => [1, 20]],
['nickname', 'string', 'length' => [0, 10]],
[['token_type', 'nickname'], 'safe'],
......@@ -102,10 +102,10 @@ class CoinIssueCoin extends CommonActiveRecord
public function verfiySymbol($attribute, $params)
{
// if (!preg_match('/^[A-Z]+$/', $this->symbol)) {
// $this->addError($attribute, 'Token简称必须大写');
// return false;
// }
if (!preg_match('/^[a-zA-Z0-9]+$/u', $this->symbol)) {
$this->addError($attribute, 'Token简称必须包含字母和数字');
return false;
}
if (CoinIssueCoin::TYPE_YES == $this->type) {
$model = CoinIssueCoin::find()->where(['symbol' => $this->symbol, 'owner' => $this->owner, 'platform_id' => $this->platform_id, 'status' => CoinIssueCoin::STATUS_SUCCESS])->orderBy('id desc')->one();
......
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