Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
c76100fe
Commit
c76100fe
authored
5 years ago
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/issue_coin' into 'master'
fix See merge request
!302
parents
82b7d9bb
77353ed7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
CoinIssueCoin.php
common/models/psources/CoinIssueCoin.php
+12
-12
No files found.
common/models/psources/CoinIssueCoin.php
View file @
c76100fe
...
...
@@ -52,7 +52,7 @@ class CoinIssueCoin extends CommonActiveRecord
[[
'name'
,
'symbol'
,
'total'
,
'owner'
,
'introduction'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
,
'charge_unit'
,
'charge'
,
'template'
],
'required'
],
[[
'total'
,
'category'
,
'type'
,
'platform_id'
,
'chain_id'
],
'integer'
],
[[
'introduction'
,
'charge_unit'
],
'string'
,
'length'
=>
[
1
,
100
]],
//
['symbol', 'string', 'length' => [6, 128]],
[
'symbol'
,
'string'
,
'length'
=>
[
6
,
128
]],
[
'name'
,
'string'
,
'length'
=>
[
3
,
50
]],
[
'nickname'
,
'string'
,
'length'
=>
[
0
,
10
]],
[[
'token_type'
,
'nickname'
],
'safe'
],
...
...
@@ -123,17 +123,17 @@ class CoinIssueCoin extends CommonActiveRecord
public
function
verfiySymbol
(
$attribute
,
$params
)
{
if
(
35
==
$this
->
platform_id
)
{
if
(
strlen
(
$this
->
symbol
)
<
6
||
strlen
(
$this
->
symbol
)
>
16
)
{
$this
->
addError
(
$attribute
,
'Token简称需在6~16个字符'
);
return
false
;
}
}
else
{
if
(
strlen
(
$this
->
symbol
)
<
1
||
strlen
(
$this
->
symbol
)
>
6
)
{
$this
->
addError
(
$attribute
,
'Token简称需在1~6个字符'
);
return
false
;
}
}
//
if (35 == $this->platform_id) {
//
if (strlen($this->symbol) < 6 || strlen($this->symbol) > 16) {
//
$this->addError($attribute, 'Token简称需在6~16个字符');
//
return false;
//
}
//
} else {
//
if (strlen($this->symbol) < 1 || strlen($this->symbol) > 6) {
//
$this->addError($attribute, 'Token简称需在1~6个字符');
//
return false;
//
}
//
}
if
(
!
preg_match
(
'/^[a-zA-Z0-9]+$/u'
,
$this
->
symbol
))
{
$this
->
addError
(
$attribute
,
'Token简称必须包含字母和数字'
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment